A voltage divider is the simplest circuit for taking part of an input voltage with just two resistors. It shows up almost every time you shrink a sensor voltage to a range a microcontroller can read, or make the reference voltage of a comparator. But it is often mistaken for a "circuit that makes voltage", and the common mistake is attaching a load and watching the output plunge. This article covers the divider formula, what changes with a load, how to choose resistor values, and worked examples. To calculate values right away, use the voltage divider calculator.
The basic formula
When you apply the input voltage Vin across R1 and R2, the same current flows through both resistors, and the voltage divides in proportion to resistance.
Vout = Vin × R2 / (R1 + R2)
If R1 and R2 are equal, the output is half the input, and if R2 is larger than R1, the output gets closer to the input. This formula is the value when nothing is connected to the output (no load).
It changes when you attach a load
When you connect a load (the input resistance of a circuit) to the output, R2 and the load become parallel, the lower resistance gets smaller, and the output drops by that much.
R2' = R2 × R_load / (R2 + R_load) Vout = Vin × R2' / (R1 + R2')
Dividing 5 V with 10 kΩ + 10 kΩ gives 2.5 V with no load. Attach a 10 kΩ load and R2' becomes 5 kΩ, so the output falls to about 1.67 V. The output of a divider has an output impedance (the parallel value of R1 and R2), so think of it as a weak signal source.
| Load resistance | Output (R1 = R2 = 10 kΩ, Vin 5 V) | Drop vs. no load |
|---|---|---|
| None | 2.50 V | 0% |
| 1 MΩ | 2.49 V | about 0.5% |
| 100 kΩ | 2.38 V | about 5% |
| 10 kΩ | 1.67 V | about 33% |
The order to decide resistor values
- Decide the ratio. Find the output-to-input ratio you need (for example, 12 V → 5 V is about 0.417).
- Decide the total resistance. Set the current through the divider,
Vin ÷ (R1 + R2), to an acceptable value and work backward. Battery circuits are commonly tens of µA (hundreds of kΩ), and general circuits 0.1 to 1 mA (a few kΩ to tens of kΩ). - Fit it to standard values. Find the combination of E24 values whose ratio is closest. Combining two resistors in series or parallel gets it more exact (the series & parallel resistor calculator).
- Check the load. If the load resistance is at least 10 times R2, the drop is within 10%. If it is not enough, reduce R or add a buffer (an op-amp).
- Allow for tolerance. With two ±5% resistors, the output ratio can be off by up to about ±5%. If you need a precise reference, use ±1% resistors.
Worked examples
Stepping a 5V signal down to 3.3V
With R1 = 1 kΩ and R2 = 2 kΩ, 5 × 2 / 3 ≈ 3.33V. You can use it for an input signal that flows in only one direction (sensor → 3.3 V input pin). Bidirectional communication lines need a level shifter (Connecting 3.3V and 5V Signals).
Reducing 12V to 5V
The ratio you need is 5/12 ≈ 0.417. R1 = 6.8 kΩ and R2 = 4.7 kΩ give 4.90 V, and R1 = 6.8 kΩ and R2 = 5.1 kΩ give 5.14 V. Where a small difference matters, use a potentiometer or fine-tune by adding a small resistor in series with R2.
Reading a battery voltage with an ADC
To read the voltage of a 12 V lead-acid battery (up to 14.4 V fully charged) with a 3.3 V ADC, set the ratio so that 14.4 V does not exceed 3.3 V. With R1 = 39 kΩ and R2 = 10 kΩ, the ratio is 0.204, giving 2.45 V at 12 V and 2.94 V at 14.4 V, which leaves room. Check the datasheet for whether it matches the input impedance the ADC requires (usually 10 kΩ or less), and if needed, add a 0.1 µF capacitor in parallel with R2 to reduce noise.
Limits of a divider
- It cannot deliver power. If you make the voltage that drives a motor or LED directly with a divider, the voltage wobbles a lot and it gets very hot. If you need a supply, use a regulator.
- It consumes current.
Vin ÷ (R1 + R2)always flows while power is connected. In battery circuits, make the resistors large. - It has an output impedance. The output has an internal resistance of R1∥R2, so if the following circuit draws current, the voltage changes.
- It follows input voltage changes exactly. If the supply voltage wobbles, the output wobbles by the same ratio.
Potentiometers and dividers
Using all three pins of a potentiometer makes a divider whose R1 + R2 total is constant. Depending on the wiper position, the output changes continuously from 0 V to Vin, and it is used for sensor reference voltages and volume controls.
Summary
Vout = Vin × R2 / (R1 + R2) is the no-load formula, and with a load you have to calculate R2 and the load in parallel. Set the load resistance to at least 10 times R2, and remember that resistor tolerance carries into output error. Next, learn standard values in Reading Resistors, and in Building a Voltage Comparator with the LM358, try applying a divider as a reference voltage.