12v to 5v - Voltage divider issues

You need to take precautions either in hardware or in software to get reasonably accurate readings when using such a high resistance source. The simplest is to connect a 0.1uF capacitor between the analog input and ground. Also remember that the input resistance of the ADC is only 100M ohms typical, so you are likely to get about 3% error using 10M and 4.4Mohm resistors.