A voltage divider is two resistors and a ratio: the first circuit in every textbook, and the cause of a surprising share of measurement errors in real products. The battery monitor that reads 8 % low, the threshold that shifts when a different comparator is fitted, the level shifter that turns a clean edge into a ramp: all dividers, all correct on paper. The ratio is the easy part. What matters is what the output can drive, and that is a question about impedance, not ratio. This guide is the reasoning behind the voltage divider calculator.
The ratio and nothing else: the ideal divider
Put R1 and R2 in series across Vin and the same current flows through both, so the voltage splits in proportion to resistance:
Only the ratio appears. 1 kΩ over 1 kΩ halves the input, and so does 1 MΩ over 1 MΩ; the formula cannot tell them apart. But the first draws a thousand times the current of the second and presents a thousandth of the output impedance, and those two numbers, not the ratio, decide whether the divider works in the circuit around it. Every design decision about a divider is a decision about scale: how much current to spend for how stiff an output.
The ratio itself is rarely exactly available. Resistors come in preferred values (IEC 60063: E12 at 10 %, E24 at 5 %, E96 at 1 %), so the calculated R1 is replaced by the nearest one you can buy and the ratio moves. For 12 V to 3.3 V with R2 = 10 kΩ, the ideal R1 is 26.36 kΩ; the nearest E24 value, 27 kΩ, gives 3.243 V, 1.7 % low before anything is connected.
Thévenin: what the load sees
Thévenin's theorem says that any network of sources and resistors, seen from two terminals, behaves as a single voltage source in series with a single resistance. For the divider the source is the unloaded output, and the resistance is what you would measure between the output and ground with Vin replaced by a short circuit: R1 and R2 in parallel.
Connect a load RL and it forms a second divider with Rth: the load receives Vth × RL ÷ (Rth + RL). The fraction lost is Rth ÷ (Rth + RL), which gives the rule of thumb every designer carries: a load of ten times the output impedance costs about 9 % of the voltage, and a load of a hundred times costs about 1 %. Turned around, if you need 1 % accuracy from an unbuffered divider, whatever reads it must be at least a hundred times R1 ∥ R2, and if it is not, the divider must be buffered or the error calibrated out. Rth also sets, with whatever capacitance hangs on the output, how fast the output can move, and it sets the thermal noise the divider adds. It is the most useful single number about a divider.
Loading in practice: ADCs, transistors and the cheap multimeter
An ADC input is the common case and the misleading one. A successive-approximation ADC draws almost nothing between conversions, so its input looks like megohms on a meter; but when it samples, a switch connects a capacitor of a few to a few tens of picofarads to the pin, and that capacitor must charge through Rth to within a fraction of a least-significant bit before the window closes. The settling time constant is Rth × Csample, and several of them are needed. Microcontroller datasheets therefore quote a maximum source impedance: the ATmega328P datasheet recommends about 10 kΩ or less, and STM32 datasheets tabulate the maximum for each selectable sampling time. Exceed it and the reading is low by an amount that depends on the previous channel, which is the classic "the ADC reads differently when I add another input" fault. Three cures: keep Rth under the limit; add a capacitor of 100 nF or so across R2, which is thousands of times the sample capacitor and is topped up by the divider between samples; or buffer with an op-amp follower, after which the ADC sees ohms.
A transistor base draws real current: IC ÷ β, so 10 mA of collector current at a β of 100 needs 100 µA. A bias divider must carry ten times that or the base steals the ratio. This is why bias networks are drawn with kilohms, not hundreds of kilohms.
The meter that checks the divider loads it too. A digital multimeter has 10 MΩ input on its voltage ranges, which is invisible to a 7.3 kΩ divider (0.07 %) but takes 4.8 % off a 1 MΩ over 1 MΩ divider. An analogue meter at 20 kΩ per volt presents 200 kΩ on its 10 V range and reads even the 7.3 kΩ divider 3.5 % low. When a divider "measures wrong" on the bench, the meter is the first suspect.
Choosing the resistor values: current, noise and impedance trade-off
Lower resistors give a stiffer output, faster settling with any capacitance, and less noise; they cost current and dissipation. Higher resistors save the battery but make the output vulnerable to everything: loading, leakage, input bias current and pickup. The numbers:
- Current and dissipation. I = Vin ÷ (R1 + R2), taken continuously. The example draws 0.324 mA from 12 V, which is 2.84 Ah a year; the power in each resistor is I²R, a few milliwatts here, but a 230 V sensing divider in the tens of kilohms dissipates a watt and needs the voltage rating and the heat considered.
- Thermal noise. A resistance R generates √(4kTR) volts per √Hz: about 13 nV/√Hz for 10 kΩ at room temperature and 130 nV/√Hz for 1 MΩ. Over a 10 kHz bandwidth that is 1.3 µV and 13 µV rms, invisible to a 12-bit ADC whose step is 0.8 mV at 3.3 V full scale, relevant to a 16-bit or a precision one.
- Bias and leakage currents. A bipolar-input op-amp draws tens of nanoamps at its inputs, CMOS and JFET inputs picoamps; PCB leakage on a dirty or humid board can be nanoamps. 50 nA through 7.3 kΩ is 0.4 mV; through 500 kΩ it is 25 mV.
The customary compromise is R2 around 10 kΩ, with R1 following from the ratio: sub-milliamp current, an output impedance in the low kilohms, and a 100 nF capacitor across R2 to keep an ADC happy. Go to about 1 kΩ for references and level shifts that must be fast or exact; go to hundreds of kilohms only for battery sensing where the drain matters, and then buffer the output or sample it slowly with a reservoir capacitor.
Tolerance and the worst case
Both resistors have a tolerance t, and the worst case for the output is one high and the other low:
The ratio error is less than 2t because R2 appears in both the numerator and the denominator and partly cancels itself. For 27 kΩ over 10 kΩ at 5 %, the unloaded output ranges from 3.012 V to 3.485 V, −7.1 % to +7.5 % about the nominal 3.243 V; with 1 % parts the range is 3.196 V to 3.291 V, about ±1.5 %. Two parts from one reel usually err the same way, so the real spread is narrower than the worst case, and a resistor network on one chip shares both tolerance and temperature coefficient, which is why precision dividers are bought as networks. For a measurement, the cheapest fix is software: read a known voltage once against a good meter, store the ratio, and the tolerance disappears, leaving only drift.
Where a divider is the wrong part
A divider sets a ratio; it cannot supply current without the ratio moving. Try to make 3.3 V for a 100 mA load from 5 V and R1 must be 17 Ω, dropping 1.7 V and dissipating 0.17 W, while R2 has to carry a current comparable to the load to hold the ratio at all; the output then moves with every change in load. A linear regulator does the same job with an output impedance of milliohms and a few per cent accuracy; a buck converter does it without the heat. A zener diode in place of R2 is a crude shunt regulator, acceptable for a few milliamps of reference current, still wasteful. The same applies to anything that draws real current: relays, motors, heaters, sensors that need a supply. An LED is a special case that takes a single series resistor, covered in choosing a series resistor for an LED.
The other place a divider fails is speed. Its output impedance and the input capacitance of whatever it drives form an RC low-pass, so a 27 kΩ over 10 kΩ level shifter on a 5 V logic output feeding 20 pF has a corner near 1.1 MHz and turns a fast edge into a ramp; at SPI or I²C clock rates use resistors of a few kilohms or a level-translator IC. The RC filters guide covers what that ramp costs.
The example in numbers
12 V to 3.3 V, R2 = 10 kΩ, E24 resistors at 5 %, a 100 kΩ load:
- Ideal R1 = 10 × 8.7 ÷ 3.3 = 26.36 kΩ → E24 27 kΩ. Unloaded output 12 × 10 ÷ 37 = 3.243 V (−1.7 %).
- Output impedance Rth = 27 ∥ 10 = 7.30 kΩ. The 100 kΩ load is 13.7 times that, so it costs 7.30 ÷ 107.3 = 6.8 %: the loaded output is 3.023 V, −8.4 % against the wanted 3.3 V.
- Current 12 ÷ 37 kΩ = 0.324 mA, 2.84 Ah a year; 2.84 mW in R1 and 1.05 mW in R2.
- Worst case unloaded with 5 % parts: 3.012 V to 3.485 V.
The calculator flags the 6.8 % loading error as a warning. The loading is fixed and known, so it can be calibrated out; the tolerance spread cannot, except by the same calibration or by 1 % parts.
The battery-monitor case
The commonest divider in a Pakistani product is the one that watches a 12 V lead-acid battery in a UPS, a solar charge controller or a telecom cabinet, feeding a 3.3 V microcontroller ADC. It has to be designed for the top of the range, not the nominal: a flat battery is about 10.5 V, a rested full one 12.6–12.8 V, and a charging one 14.4–14.8 V, higher during equalisation. Set full scale at 15 V and aim for 3.0 V there to leave 0.3 V of margin below the ADC reference.
- Ratio. With R2 = 10 kΩ, R1 = 10 × 12 ÷ 3 = 40 kΩ → E24 39 kΩ. 15 V gives 3.061 V, safely under 3.3 V; 12.6 V gives 2.571 V; 10.5 V gives 2.143 V.
- Resolution. A 10-bit ADC at 3.3 V resolves 3.22 mV per step, which is 15.8 mV at the battery: enough to see 0.1 V of change, and a 12-bit ADC does four times better.
- The ADC. Rth = 39 ∥ 10 = 7.96 kΩ, under the ATmega328P's 10 kΩ guideline but with little to spare; add 100 nF across R2. The reservoir recharges with τ = 7.96 kΩ × 100 nF = 0.80 ms, so sampling every 100 ms or slower it is always full. An op-amp follower is the alternative if the ADC must sample fast.
- The drain. At 12.6 V the divider draws 0.257 mA, 2.25 Ah a year, a third of a 7 Ah alarm battery. If the product spends its life asleep, switch the top of the divider with a P-channel MOSFET driven from a GPIO pin, or use 390 kΩ over 100 kΩ (Rth = 80 kΩ, a tenth of the current) and rely on the 100 nF reservoir, which now recharges with τ = 8 ms and is full again 40 ms after a sample.
- Calibration. 5 % resistors put the reading anywhere within about ±7 %. Measure the battery once with a good meter during production test, store the correction, and the reading is as good as the meter and the ADC reference.
For a battery that sees an alternator or a long cable, add a clamp: the series resistor already limits the current into the pin, but a transient above the supply rail still needs a Schottky diode or a TVS to keep it out of the microcontroller. Ahmedonics builds this measurement into its monitoring and control hardware as a matter of course; if you are specifying a product that must report battery state reliably, our custom engineering team can help.
References
- 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
- IEC 60063:2015, Preferred number series for resistors and capacitors — E12, E24 and E96 values
- 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