ADC Voltage Calculator

Convert ADC readings to volts and back for Arduino, ESP32 and Pico, with LSB size and an optional voltage divider for higher voltages.

  • Free, no signup
  • Works on mobile
  • Formula + worked example

How to use the ADC voltage calculator

  1. Pick your board preset — Arduino Uno (5 V, 10-bit), ESP32 (3.3 V, 12-bit) or Raspberry Pi Pico (3.3 V, 12-bit) — or set your own reference voltage and resolution (8, 10, 12 or 16 bits).
  2. Choose Reading → voltage to turn an analogRead() value into volts, or Voltage → reading to predict what the ADC will report.
  3. If you measure something bigger than the reference (a 12 V battery, for example), tick Input voltage divider and enter R1 and R2.
  4. Read the pin voltage, the real input voltage, the size of one step (LSB) and the highest voltage you can safely measure.

Formula

An n-bit ADC splits the range 0 V to V_ref into 2ⁿ equal steps. Each step is called an LSB (least significant bit).

1 LSB = V_ref ÷ 2ⁿ V_pin = reading × V_ref ÷ 2ⁿ reading = V_pin × 2ⁿ ÷ V_ref (rounded down) With a divider (R1 on top, R2 to GND): V_pin = V_in × R2 ÷ (R1 + R2) V_in = V_pin × (R1 + R2) ÷ R2

The Arduino example sketch divides by 1023 instead of 1024. Both are fine — the difference is less than one step. Choose the convention in the calculator to match your code.

BoardResolutionReference (full scale)1 LSBReading range
Arduino Uno / Nano10-bit5 V (or 1.1 V internal)4.88 mV (1.07 mV)0–1023
ESP3212-bitabout 3.3 V at the default 11 dB attenuationabout 0.81 mV0–4095
Raspberry Pi Pico12-bit3.3 V supply0.81 mV0–4095 (read_u16() gives 0–65535)

Choosing divider resistors

  • Make sure the maximum input shown by the calculator is above the highest voltage you will ever connect, with some margin.
  • Keep the resistors in the kΩ range. Very small values waste battery current; very large values (hundreds of kΩ) give noisy, low readings because the ADC needs current to charge its sampling capacitor. The ATmega328P datasheet recommends a source resistance of 10 kΩ or less.
  • If you must use large resistors, put a 100 nF capacitor from the ADC pin to GND.
  • Use the voltage divider calculator to try other resistor pairs.

Common mistakes

  • Putting more than the supply voltage on an ADC pin. 5 V on an ESP32 or Pico pin can damage it. Always use a divider for higher voltages.
  • No common ground. The sensor or battery negative must connect to the board's GND, or the reading is meaningless.
  • A floating input. An unconnected analog pin reads random values — that is normal, not a fault.
  • Mixing up resolutions. The same voltage gives 512 on an Uno but about 2048 on an ESP32 or Pico. Match the formula to the board.
  • Trusting 16-bit numbers. MicroPython's read_u16() on the Pico is scaled to 0–65535, but the real ADC is still 12-bit.

Measuring temperature? Pair this tool with the NTC thermistor calculator. Monitoring a robot battery? Read our robot battery guide and estimate runtime with the battery life calculator. To choose a board, see Arduino vs ESP32 vs Raspberry Pi Pico, and find sensors and boards in our products.

Frequently asked questions

How do I convert an analogRead value to voltage?+

Multiply the reading by the reference voltage and divide by 2ⁿ, where n is the ADC resolution. On an Arduino Uno, a reading of 512 gives 512 × 5 ÷ 1024 = 2.5 V. On a 12-bit ESP32 or Pico, divide by 4096 and use 3.3 V.

Should I divide by 1023 or 1024?+

The datasheet formula uses 1024 (2¹⁰) for a 10-bit ADC, while the Arduino example sketch uses 1023. The difference is less than one step (about 5 mV on an Uno), which is smaller than the ADC's own error, so either is fine.

How can I measure 12 V with a 5 V or 3.3 V ADC?+

Use a voltage divider. With R1 = 30 kΩ and R2 = 7.5 kΩ, the pin sees one fifth of the input, so 12 V becomes 2.4 V. Multiply the measured pin voltage by (R1 + R2) ÷ R2 to get the real voltage back.

Why are my ESP32 ADC readings inaccurate?+

The ESP32 ADC is non-linear near the ends of its range: it reads 0 below about 0.1–0.15 V and flattens out above roughly 2.5–3.1 V. Keep signals between about 0.15 V and 2.45 V, use analogReadMilliVolts() for calibrated results, and use ADC1 pins because ADC2 is blocked while Wi-Fi is on.

What is the resolution of a 10-bit ADC at 5 V?+

One step (LSB) is 5 V ÷ 1024 = 4.88 mV. A 12-bit ADC at 3.3 V has steps of 3.3 ÷ 4096 = 0.81 mV. Noise usually makes the last one or two steps unreliable.

From the Thinking Robot store

Shop all
All tools
WhatsApp