Possible to calibrate analogRead()?

Hi!
is it possible to calibrate analogRead?
I got an xmeg128A3U that reads the value 43 when I connect the analog port to ground.

I want the range to be 0 - 1023, not 42 - 1023

Subtract 43 from all your readings?
Check that the result does not go below 0.

So it's not possible to calibrate it so I don't need to subtract a value from my readings?
do it physically?

Put a summing op-amp in your circuit and add some offset to bring the output down to 0.
The offset can be controlled via DAC that the arduino controls.

hansibull:
I got an xmeg128A3U that reads the value 43 when I connect the analog port to ground.

That’s odd. If it’s consistent then you could either correct it in hardware as suggested, or provide a wrapper function that performs the analogRead() and then maps the result to the correct range.