STM32L073 VREFINT with variable power supply

I am trying to read an input voltage using the analog in pin.
The issue is that the Microcontroller is working with a battery with ranges: full 3.6 - low 2.2V.
How could I get a good precision in volts without knowing the power source (which is variable from 3.6 to 2.2V)

AnalogIn adc_vref(ADC_VREF);

float vref = ((1.224f) /*1000; //get the value in mVolts

The thing is that 1.224 as volt reference seems to be not always the same.

Any idea about it?