How to efficiently read a battery voltage level with ADC
@rdtsc has removed his answer which IMO raises a valid concern. I don't think the OP can rely on +5V to always be present (else, they wouldn't need the battery, would they?), and when that +5V is removed, the MCU will be powered via the pin's clamping diodes.

It is therefore recommended to either add a significant series resistor to the measurement pin which will reduce the leakage current to a minimum, or add an active circuit which connects the battery to the MCU only when a measure must be taken:



Depending on the expected intervals the system will spend without +5V power, the schematic above may be an overkill, but at least a series resistor should be there.