ADC Resolution Calculator
Calculate LSB size, levels, max code, and convert Voltage ↔ Code for an ideal ADC using any reference range.
How to Use
- Choose your bit depth (e.g., 10, 12, 16).
- Set Vref Low and Vref High (range can be 0–3.3V, 0–5V, or offset like 1–2V).
- Enter either a Voltage or an ADC Code to convert (or both).
- Open Show Work for formulas and intermediate steps.
Tip: Use Vref Low for offset ADC ranges (example: 1.000V to 2.000V sensors).
Show Work (step-by-step)
0 .. (2^N − 1) and step size LSB = (VrefHi − VrefLo) / 2^N.
Reference
- Levels:
Levels = 2^N - Max code:
Max = 2^N − 1 - Range:
Range = VrefHi − VrefLo - LSB (step size):
LSB = Range / 2^N - Voltage from code:
V = VrefLo + Code × LSB - Code from voltage (ideal):
Code = (Vin − VrefLo) / LSB(then round/floor/ceil) - Quantization error: approximately
±0.5 LSB
Notes: Real ADCs also have offset/gain error, INL/DNL, noise, and reference tolerance. This tool covers the ideal math.
FAQ
What does “LSB” mean?
LSB is the smallest input voltage change that moves the ADC output by 1 code (for an ideal ADC).
Why is it 2^N levels but 2^N − 1 max code?
Because code starts at 0. With 2^N total codes, the last one is 2^N − 1.
Which rounding should I use for Voltage → Code?
Round is common for estimating the nearest code. Floor matches “truncate” style conversions. Ceil is useful when you need a guaranteed non-underestimate.
Can I use an offset range (not starting at 0V)?
Yes—set Vref Low and Vref High to your actual input span.
Tool Info
Last updated:
Updates may include extra formatting options, export helpers, and edge-case handling.