ADC sample rate calculator
Every ADC reading takes a fixed number of ADC clock cycles. Pick your board and its ADC setting to see how long one conversion takes and how many readings per second the hardware can make.
Results are arithmetic on published formulas, not measurements. Check them on your hardware. Free, no sign-up
Why an ADC conversion takes time
An ADC first samples: it connects a small internal capacitor to the pin and lets it charge to the input voltage. Then it converts: it compares that stored voltage bit by bit. Both steps run on the ADC clock, which the chip makes from its main clock through a prescaler, so the conversion time is a fixed number of ADC clock cycles.
Sample rate is not the same as analogRead() speed
This calculator gives the hardware limit. A call such as analogRead() adds its own work (selecting the channel, starting, waiting, returning) and your loop adds more. Reading at the full rate usually needs the ADC’s free-running mode, DMA or a FIFO.
How fast do you need?
To capture a signal, sample at more than twice its highest frequency (the Nyquist rate); five to ten times is more comfortable. A temperature changes over seconds and needs a few readings per second; audio needs tens of thousands.
What about the ESP32?
Espressif does not publish a fixed conversion time for analogRead() on the ESP32, ESP32-S3 or ESP32-C3, so this calculator does not guess one. Measure it in your sketch: time a few hundred analogRead() calls with micros() and divide.
The formula
rate = fADC / cycles per conversion AVR (ATmega328P, ATmega2560): fADC = fCPU / prescaler, 13 cycles (25 for the first conversion) STM32F4: Tconv = sampling time + 12 cycles, fADC at most 36 MHz RP2040, RP2350: 96 cycles at 48 MHz, at most 500000 samples per second nRF52840 SAADC: one sample = TACQ + tCONV (under 2 µs)
Source: ATmega328P datasheet, ADC “Prescaling and Conversion Timing”; RM0368 11.5 “Channel-wise programmable sampling time” and the STM32F401 datasheet (fADC); RP2040 Datasheet 4.9 ADC; nRF52840 Product Specification, SAADC.
Worked example
Arduino Uno with the Arduino default prescaler of 128: the ADC clock is 16 MHz / 128 = 125 kHz, a conversion takes 13 cycles = 104 µs, so the hardware can make about 9615 readings per second.
Prescaler 16 would give a 1 MHz ADC clock and about 76900 readings per second, but the datasheet asks for 50 to 200 kHz for full 10-bit accuracy. A Raspberry Pi Pico converts in 96 cycles of 48 MHz: 2 µs, 500000 readings per second.
Questions and answers
How fast is analogRead() on an Arduino Uno?
A conversion takes 104 µs at the default prescaler of 128 (13 ADC clocks at 125 kHz), so the hardware makes at most about 9600 readings per second. With the overhead of analogRead() itself, a little over 100 µs per call is typical, so roughly 9000 readings per second in a tight loop.
Can I make the Arduino ADC faster?
Yes, with a smaller prescaler (the ADPS bits in the ADCSRA register). Prescaler 64 gives a 250 kHz ADC clock and about 19200 readings per second; smaller prescalers are faster still. Above 200 kHz the datasheet no longer promises full 10-bit accuracy, so the last bits get noisier.
Why is there no number for the ESP32?
Espressif does not publish a fixed conversion time for analogRead() on the ESP32 family, and the time depends on the core version and settings. Rather than guess, measure it: call analogRead() a few hundred times, time the loop with micros() and divide.
What sample rate do I need?
More than twice the highest frequency in the signal (the Nyquist rate), and preferably five to ten times. Slow things such as temperature or a potentiometer need only a few readings per second; audio needs tens of thousands.
Why are my ADC readings wrong or noisy at high speed?
At high sample rates the internal capacitor has less time to charge. If the source has a high resistance, for example a divider made of 100 kΩ resistors, it cannot charge fully and readings come out low or noisy. Use a lower source resistance (the ATmega328P datasheet is written for about 10 kΩ or less), a longer sample time where the chip has one (STM32, nRF52), or a small capacitor on the pin for slow signals.
Learn the background
Free lessons of the BoardPilot course that explain the ideas behind this calculator:
ADC: reading the analog worldTimers and interrupts
Other calculators
LED resistor calculatorVoltage divider calculatorI2C pull-up resistor calculatorUART baud rate calculatorPWM and timer calculator
See it on a real board
BoardPilot uses these same calculations inside the app, next to a live 3D view of your board, its pins and wires, with guided debugging when something does not work. Try it in your browser, or download it for macOS and Windows.