What it does
A voltage divider is two resistors in series across a supply. The voltage at the point between them is a fixed fraction of the input. It's the standard way to scale a signal down, for example to read a 12 V battery with a 5 V or 3.3 V microcontroller, or to set a reference voltage. This calculator finds the output voltage, or the value of R1 or R2 that gives the output you want. It also shows the current, the power in each resistor and the effect of a load connected across the output.
How it's calculated
R1 = R2 × (Vin − Vout) ÷ Vout · R2 = R1 × Vout ÷ (Vin − Vout)
With a load RL: replace R2 with R2 ∥ RL = R2 × RL ÷ (R2 + RL)
R1 connects the input to the output point, and R2 connects the output to ground. The same current, I = Vin ÷ (R1 + R2), flows through both resistors in series, and each one drops V = I × R. Any load connected across the output sits in parallel with R2 and lowers the effective bottom resistance, so the output falls.
Worked examples
- 5 V to about 3.3 V: SparkFun's example uses R1 = 1.8 kΩ and R2 = 3.3 kΩ. Vout = 5 × 3.3 ÷ (1.8 + 3.3) = 5 × 3.3 ÷ 5.1 = 3.235 V.
- Choosing R2: you want 3.3 V from 5 V with R1 = 10 kΩ. R2 = 10 × 3.3 ÷ (5 − 3.3) = 33 ÷ 1.7 = 19.41 kΩ. The nearest common value, 20 kΩ, gives 5 × 20 ÷ 30 = 3.33 V.
- The load effect: 12 V across two 10 kΩ resistors gives 6 V. Connect a 10 kΩ load across R2 and the bottom becomes 10 ∥ 10 = 5 kΩ, so Vout = 12 × 5 ÷ 15 = 4 V. The output dropped by a third.
Getting a realistic number
- Keep the load light. A rule of thumb is to make the load at least 10 times larger than R2, so the output changes by less than about 10%.
- Don't power things from a divider. As SparkFun points out, the current a load draws also flows through R1 and is wasted as heat. Use a voltage regulator to power circuits; use a divider to scale signals.
- Resistor tolerance: with 5% resistors, the output can be off by a few percent. Use 1% resistors for measurements.
- Check resistor power ratings. Small resistors are often rated 1/8 W or 1/4 W. The calculator shows the power in each.