An Arduino Uno turns a voltage into a whole number between 0 and 1023. A newer board offers 12 bits and 4,096 steps, and a separate converter chip offers 16 or 24. More bits looks like more precision. It is, up to a point, and the point is set by two things the bit count does not mention: the reference voltage and the noise. Every figure below was calculated in Python and NumPy, including a simulated ideal converter checked against the textbook formula.
Steps, codes and one LSB
Counting the steps
An analog-to-digital converter divides a voltage range into equal steps and reports which step the input falls in. An N-bit converter has 2 to the N steps. The size of one step is called the least significant bit, or LSB:
1 LSB = reference voltage / 2^N
Arduino’s own documentation does the arithmetic for a 5 V Uno: input from 0 to the operating voltage maps to integer values between 0 and 1023, which gives “5 volts / 1024 units or 0.0049 volts (4.9 mV) per unit.”
The table
| Bits | Codes | 1 LSB at 5 V | 1 LSB at 3.3 V | 1 LSB at 1.1 V |
|---|---|---|---|---|
| 8 | 256 | 19.53 mV | ||
| 10 | 1,024 | 4.88 mV | 3.22 mV | 1.07 mV |
| 12 | 4,096 | 1.22 mV | 0.81 mV | 0.27 mV |
| 16 | 65,536 | 0.076 mV |
Two bits more means four times as many steps and a step a quarter of the size. So does dropping the reference from 5 V to about 1.2 V. That is the first thing the bit count does not say: resolution in volts depends on the range just as much as on the bits.

The reference voltage is half the answer
Changing the range
On AVR-based Arduinos the reference is set with analogReference(). The documented options are the default of 5 volts on 5 V boards or 3.3 volts on 3.3 V boards, a built-in 1.1 volts on the ATmega168 or ATmega328P, and EXTERNAL, which uses whatever voltage is on the AREF pin, 0 to 5 V only.
A temperature sensor example
Take a sensor whose output changes by 10 mV per degree Celsius, a common scale for analog temperature chips. One step of the converter corresponds to:
| Setup | 1 LSB | Temperature per step |
|---|---|---|
| 10-bit, 5 V reference | 4.88 mV | 0.49 °C |
| 10-bit, 1.1 V reference | 1.07 mV | 0.11 °C |
| 12-bit, 3.3 V reference | 0.81 mV | 0.08 °C |
Switching the Uno to its 1.1 V internal reference makes the same 10-bit converter more than four times finer, with no new hardware. The cost is range: anything above 1.1 V reads as the maximum code. If the sensor’s output never goes above 1.1 V across the temperatures being measured, that range is wasted at 5 V.
Two warnings from the documentation
Arduino’s reference page carries two notes worth repeating. The first few readings after changing the reference may not be accurate, so a sketch should throw them away. And if an external voltage is connected to AREF, the reference must be set to EXTERNAL before calling analogRead(). The page warns that otherwise the internal reference can be shorted to the AREF pin, which can damage the microcontroller.
Quantization error and the 6.02N formula
Half a step either way
Even a perfect converter rounds. Walt Kester’s tutorial for Analog Devices states the limit: the maximum error an ideal converter makes when digitizing a signal is ±½ LSB. For a signal that moves across many steps, the tutorial models that error as a sawtooth with a peak-to-peak size of one LSB, and its rms value works out to one LSB divided by the square root of 12, about 0.289 LSB.
From there comes the most quoted formula in data conversion. For a full-scale sine wave, measured over the band from DC to half the sample rate, the signal-to-noise ratio of an ideal N-bit converter is:
SNR = 6.02 N + 1.76 dB
Each extra bit is worth about 6 dB.
Checking the formula
A simulated ideal converter, fed a full-scale sine wave of about two million samples, produced these results:
| Bits | Formula | Simulated | RMS error | Largest error |
|---|---|---|---|---|
| 8 | 49.92 dB | 49.98 dB | 0.286 LSB | 0.500 LSB |
| 10 | 61.96 dB | 62.00 dB | 0.287 LSB | 0.500 LSB |
| 12 | 74.00 dB | 74.03 dB | 0.288 LSB | 0.500 LSB |
| 16 | 98.08 dB | 98.10 dB | 0.289 LSB | 0.500 LSB |
The formula holds to within a tenth of a decibel, the largest error is exactly half a step, and the rms error sits right at 1 divided by the square root of 12.

Real converters fall short: ENOB
The ideal is a ceiling
Kester is clear about what the formula is: it represents the theoretical performance of a perfect N-bit ADC, the line real parts can be compared against. He also warns that misreading where it comes from can lead to significant misinterpretation of both datasheet specifications and converter performance.
A real converter adds its own noise, plus distortion and noise from the board, the supply and the reference. The usual way to express the result is effective number of bits, or ENOB: take the measured SNR and run the formula backwards.
ENOB = (measured SNR - 1.76) / 6.02
A “12-bit” converter that measures 60 dB is delivering about 9.7 effective bits. One that measures 56 dB is down to 9.0. The last two or three bits of the output are noise.
Full scale only
The formula also assumes the signal fills the whole range. A smaller signal uses fewer of the codes, and every halving of amplitude costs 6 dB:
| Signal size, 12-bit ideal converter | SNR | Effective bits |
|---|---|---|
| Full scale | 74.0 dB | 12.0 |
| Half scale | 68.0 dB | 11.0 |
| Quarter scale | 62.0 dB | 10.0 |
| One tenth of scale | 54.0 dB | 8.7 |
A signal that only ever reaches a quarter of the range on a 12-bit converter gets 10-bit performance. Fitting the reference to the signal, as in the temperature example, recovers those bits.
The 1023 versus 1024 argument
Two divisors in one document
Converting a reading back to volts looks simple: multiply by the reference and divide by the number of steps. The question is which number. Arduino’s own page uses both. The prose says 5 volts divided by 1024 units. The example code on the same page computes ADC_STEPS as (1 << R_BITS) - 1, which for 10 bits is 1023, and divides by that.
How much it matters
The two choices produce slightly different answers:
| Code | × 5 / 1023 | × 5 / 1024 | (code + 0.5) × 5 / 1024 |
|---|---|---|---|
| 0 | 0.00000 V | 0.00000 V | 0.00244 V |
| 512 | 2.50244 V | 2.50000 V | 2.50244 V |
| 1023 | 5.00000 V | 4.99512 V | 4.99756 V |
The largest difference anywhere in the range is 4.88 mV, which is exactly one LSB. Dividing by 1023 makes the top code read as the full reference voltage, which looks tidy. Dividing by 1024 matches the definition of a step. Adding half a step reports the middle of the range each code stands for, which fits the ±½ LSB picture above.
None of the three is wrong by more than one step, and a typical hobby converter’s own errors are larger than that. The only real mistake is mixing them, for example calibrating with one and converting with the other.

Getting more out than the bits put in
Averaging
Kester’s tutorial covers a way past the bit count. When the signal of interest occupies a smaller bandwidth than the sample rate allows, digital filtering removes noise outside it, and the SNR rises by a term he calls process gain. Sampling faster than twice the signal’s bandwidth is oversampling, and the tutorial notes it is the central idea behind sigma-delta converters.
Worked out, the gain is 10 times the log of the oversampling ratio:
| Oversampling | Gain | Extra bits |
|---|---|---|
| 4× | 6.0 dB | 1 |
| 16× | 12.0 dB | 2 |
| 64× | 18.1 dB | 3 |
| 256× | 24.1 dB | 4 |
Each extra bit costs four times as many samples.
Why a little noise helps
Averaging only works if the readings vary. A simulated input held at 0.3 LSB, read 1,000 times by a perfectly quiet converter, rounded to 0 every time, so the average was 0.0. The same input with random noise of 0.5 LSB rms added, read 100,000 times, averaged 0.295. The noise pushed some readings up to 1, and the proportion of ones carried the information the converter could not resolve alone. Engineers call deliberately added noise of this kind dither.
That turns the usual intuition around. A completely noise-free signal into a 10-bit converter gives exactly 10 bits no matter how many readings are averaged. A slightly noisy one, averaged, can give more.
Choosing a resolution
Match the bits to the job
- Work out the smallest change that needs to be seen, in volts, and set the reference so the signal fills as much of the range as possible.
- Divide the range by that change. The result tells how many steps are needed, and the bit count follows.
- Read the converter’s ENOB or SNR figure, not just its headline bits. The last bits of an inexpensive 12- or 16-bit converter are often noise.
- When a few more bits are needed and the signal is slow, averaging many readings is free.
On Arduino boards with a better converter, analogReadResolution() raises the reported resolution, which the analogRead() page notes defaults to 10 bits for compatibility. Asking for more bits than the hardware has only pads the number.
Sources
- Walt Kester, Analog Devices, MT-001 Tutorial, “Taking the Mystery out of the Infamous Formula, ‘SNR = 6.02N + 1.76dB,’ and Why You Should Care,” Rev. A, 10/08: https://www.analog.com/media/en/training-seminars/tutorials/MT-001.pdf
- Arduino documentation, analogRead(): https://docs.arduino.cc/language-reference/en/functions/analog-io/analogRead/raw/
- Arduino documentation, analogReference(): https://docs.arduino.cc/language-reference/en/functions/analog-io/analogReference/raw/
