Foor higher voltages I'd recommend using the 1V1 Vref too as when using a divder the Granularity of the measurement will be degraded by the divider ratio. With a "Standard" Vref of 5V the minimum step size is 5/1024 or 4.88 mV so you can resolve 2 bits or worst case 9.7 mV/5V now divide a 25V signal by 5 to fit it into the 5V max range of the A/D and your minimum step is 5 X 4.88 mV or 24.4 mV/step or effectively 48 mV/2 steps or bits. Using the built in 1V1 Vref will bring the voltage measurements back in line. There is also one more "advantage" and that is that the 5V Vref is the processor Vcc and If you are powering the device from the USB port the Vcc might not be 5V... So the measurement is "Ratiometric" or relative to the actual Vcc and not a "Standard" Vref, where the internal 1V1 Vref is regulated by the Processor and will provide more accurate measurements. For ultimate accuracy the measurement should be calibrated by comparing the results at 3 points low, middle... with an accurate DMM so as to insure that the measurements are accurate and linear. This simple method has served me well for many years.
Bob