What the calculator does
Two resistors in series across a voltage split it in the ratio of their values. That is the whole circuit, and it is used everywhere: to bring a 12 V battery down to what a 3.3 V analogue input can measure, to set the feedback point of a regulator, to bias a transistor, to read a potentiometer. The calculator takes the input, the output you want and the lower resistor R2, works out the ideal R1, and picks the nearest value you can actually buy from the E12, E24 or E96 series. It then tells you what that divider will really do: its unloaded output and the error against what you asked for, the output once the load you name is connected, the current it draws around the clock, the power in each resistor, its Thévenin (output) impedance, and the spread of output when both resistors sit at the edge of their tolerance.
Formula
Vout = Vin × R2 ÷ (R1 + R2) (unloaded)
R2′ = R2 ∥ RL = R2 × RL ÷ (R2 + RL) Vout,loaded = Vin × R2′ ÷ (R1 + R2′)
I = Vin ÷ (R1 + R2) PR1 = I² × R1 PR2 = I² × R2
Rth = R1 ∥ R2 = R1 × R2 ÷ (R1 + R2)
Vout,max = Vin × R2(1 + t) ÷ (R1(1 − t) + R2(1 + t)) Vout,min = Vin × R2(1 − t) ÷ (R1(1 + t) + R2(1 − t))
where RL is the load resistance on the output and t the resistor tolerance as a fraction. The loading error is the drop from the unloaded to the loaded output; it depends only on the ratio of Rth to RL and is Rth ÷ (Rth + RL), which is why the output impedance matters more than the resistor values themselves. The standard R1 is the nearest value in the chosen IEC 60063 series, nearest rather than rounded up, because a divider output can be wrong in either direction.
Worked example
A 12 V lead-acid battery to be read by a 3.3 V ADC, aiming at 3.3 V for 12 V, with R2 = 10 kΩ, E24 resistors at 5 % and the ADC input presenting 100 kΩ:
- Ideal R1 = 10 × (12 − 3.3) ÷ 3.3 = 26.36 kΩ; the nearest E24 value is 27 kΩ.
- Unloaded output = 12 × 10 ÷ 37 = 3.243 V, which is −1.7 % against the 3.3 V wanted.
- With the 100 kΩ load: R2 ∥ load = 10 ∥ 100 = 9.09 kΩ, so the output is 12 × 9.09 ÷ 36.09 = 3.023 V, a loading error of −6.8 % (−8.4 % against the wanted value).
- Divider current = 12 ÷ 37 kΩ = 0.324 mA, which is 2.84 Ah a year. Power: PR1 = 0.324² × 27 = 2.84 mW, PR2 = 1.05 mW; any 0.125 W part will do.
- Output impedance Rth = 27 ∥ 10 = 7.30 kΩ.
- Worst case unloaded with 5 % resistors: 3.012 V (R1 high, R2 low) to 3.485 V (R1 low, R2 high).
The verdict is a warning: the load pulls the output down by 6.8 %, so either buffer the divider, use lower resistors, or allow for the loaded value where it is read. Note also that 3.3 V at exactly 12 V leaves no headroom: a charging battery sits near 14.4 V, which would put 3.89 V on the pin. The guide sets full scale at 15 V instead for that case.
When a divider is the right part
| Task | Divider? | Why, and what to use instead |
|---|---|---|
| Sensing a battery or supply voltage with an ADC | Yes, with a buffer, a high-impedance input or a capacitor across R2 | The ADC draws only a pulse of current while it samples; keep R<sub>th</sub> low, or put 100 nF across R2 as a charge reservoir, or add an op-amp follower. |
| Powering a 3.3 V device from 5 V | No | The load current is large and varies; the output collapses with it and R1 gets hot. Use a linear regulator (LDO) or a buck converter. |
| Level-shifting a 5 V logic output to a 3.3 V input at low speed | Yes | The receiving pin's input capacitance and R<sub>th</sub> form an RC low-pass; keep the resistors at a few kΩ for anything above a few hundred kHz, or use a level translator. |
| Setting a reference or threshold (comparator, regulator feedback) | Yes, with 1 % parts | The ratio, not the absolute value, matters; E96 1 % or 0.1 % parts, and a load that is high impedance or accounted for. |
| Biasing a transistor base or an op-amp input | Yes | Run the divider at ten times or more the current the base draws and the error stays within a few per cent. |
| Anything that draws real current: a relay, an LED, a motor, a heater | No | A divider sets a ratio; it cannot supply current without the ratio moving. LEDs take a series resistor; the rest take a regulator or a driver. |
Assumptions and limitations
- DC and slow signals only. The output impedance and any capacitance on the output form an RC low-pass: 7.30 kΩ with 20 pF of pin and track capacitance rolls off from about 1.1 MHz. For fast edges use low resistors or a proper level translator.
- ADC sample-and-hold capacitors need a low source impedance. A SAR ADC charges its sampling capacitor (a few to a few tens of pF) through Rth during a short sampling window, and the settling time constant is Rth × Csample. Datasheets give a maximum source impedance for the default sampling time (about 10 kΩ or less for the ATmega328P; a table of RAIN against sampling cycles for STM32 parts). A 100 nF capacitor across R2 acts as a reservoir that the divider tops up between samples; a buffer amplifier removes the problem entirely.
- Temperature coefficient is not modelled. Two resistors of the same type on the same board drift together and the ratio largely cancels; mixed types do not.
- Leakage and input bias currents are not modelled. Tens of nanoamps into a 7.3 kΩ source shift the output by microvolts; into a 500 kΩ source, by tens of millivolts.
- The divider drains the source continuously. 0.32 mA is roughly 2.8 Ah a year. On a battery-powered device, switch the top of the divider through a MOSFET or a GPIO pin, or use much higher resistors and a buffer.
- The worst case assumes both resistors at opposite limits. Parts from one reel usually err the same way, so the real spread is smaller; 1 % parts bring the example to about ±1.5 %.
Frequently asked questions
Why not just use two equal resistors?
Two equal resistors give exactly half the input, which is only what you want when you want half. For 12 V to 3.3 V the ratio is 27 to 10, not 1 to 1. The calculator finds R1 for whatever R2 you have chosen, so pick R2 for the current and impedance you can live with and let the ratio set R1.
How do I choose R2?
R2 sets the scale of everything: the divider current, the dissipation and the output impedance R1 ∥ R2. Around 1 kΩ gives a stiff, low-noise output at the cost of milliamps; 10 kΩ is the usual compromise for an ADC input with a small capacitor across R2; 100 kΩ to 1 MΩ keeps the drain on a battery negligible but then the output must be buffered or read by a very high-impedance input. Choose the current you can afford first and R2 follows.
Can I use a divider as a power supply?
No. The output moves with the load current, and the resistors must carry more current than the load to hold the ratio at all, so the divider wastes more than the load uses. A linear regulator costs a few rupees and has an output impedance of milliohms; a buck converter does the same efficiently. A zener is a crude alternative for a few milliamps.
What is a potentiometer?
A resistor with a third, sliding contact: a divider whose ratio you can turn. The wiper sees a Thévenin impedance of Ra ∥ Rb, at most a quarter of the total at mid-travel, so a 10 kΩ potentiometer presents up to 2.5 kΩ, and loading applies exactly as it does to fixed resistors. Feeding a potentiometer wiper into a 10 kΩ input makes the scale non-linear.
Where do I find the ADC input impedance?
In the microcontroller datasheet under the ADC section, usually as "analog input circuitry", "source impedance" or "RAIN max": a figure with a switch, a series resistance and the sampling capacitor. The ATmega328P datasheet recommends a source impedance of about 10 kΩ or less; STM32 datasheets tabulate the maximum source resistance for each sampling time. If you cannot find it, 10 kΩ or less with 100 nF across R2 is safe for slow signals.
References
- IEC 60063:2015, Preferred number series for resistors and capacitors — E12, E24 and E96 values
- P. Horowitz and W. Hill, The Art of Electronics, 3rd ed., Cambridge University Press, 2015 — §1.2.3 voltage dividers; §1.2.5 Thévenin equivalent circuit
- Microchip, ATmega328P datasheet, ADC: analog input circuitry — sampling capacitor and the recommended source impedance of about 10 kΩ or less
- STMicroelectronics, AN2834: How to get the best ADC accuracy in STM32 microcontrollers — source impedance, sampling time and the external capacitor