Voltage Divider for measuring more than 5V

The problem that i'm getting random values, not what i really want

I'm currently testing on a 9V battery, but i want to measure different, maybe higher voltages later

What values do you suggest, and how do you see the code and the connection, Is there a problem there ?