Voltage divider explained
How a voltage divider works
Vout = Vin × R2 / (R1 + R2)
Two resistors in series share the input voltage in proportion to their values. R1 sits between the input and the output, R2 between the output and ground; the output is the voltage across R2.
The same current flows through both resistors: I = Vin / (R1 + R2). Higher values waste less current but make the output more sensitive to whatever you connect to it.
The formula assumes nothing draws current from the output. In practice, keep the load at least ten times larger than R2, or the output drops below the calculated value.
Worked example: reading a 12 V battery on an Arduino
An Arduino analog input accepts at most 5 V. To measure a 12 V battery, use R1 = 20 kΩ and R2 = 10 kΩ.
- Output voltage
Vout = 12 × 10k / (20k + 10k) = 4.0 V - Divider current
I = 12 / 30k = 0.4 mA - Highest input before Vout reaches 5 V
Vin max = 5 × 30k / 10k = 15 V
The pin sees 4 V and stays under 5 V up to a fully charged 15 V input, while the battery loses only 0.4 mA. In code, multiply the reading by 3.
Common mistakes
Using a divider as a power supply
As soon as a module draws current, the output sags. To power anything, use a voltage regulator or a buck converter instead.
Swapping R1 and R2
R2 is the resistor to ground. Swapping them gives Vin × R1 / (R1 + R2), which turns 4 V into 8 V in the example above and can damage an input pin.
Choosing values that are too low or too high
100 Ω resistors on 12 V waste 60 mA. Megohm values pick up noise and are pulled down by the ADC's input. Between 1 kΩ and 100 kΩ suits most signal dividers.
Forgetting the tolerance
Two ±5% resistors can shift the ratio by several percent. Use ±1% parts for measurements, or calibrate in software.
Voltage divider FAQ
Vout = Vin × R2 / (R1 + R2), where R2 is the resistor connected to ground. To find R2 for a target output: R2 = R1 × Vout / (Vin − Vout).
R1 = 1 kΩ and R2 = 2 kΩ give 3.33 V. That suits logic signals, such as a 5 V Arduino TX into a 3.3 V ESP8266 RX, but not powering a 3.3 V board.
No. A load in parallel with R2 lowers the output, and the voltage changes as the current changes. Use a regulator such as an AMS1117-3.3 or an LM7805.
The load sits in parallel with R2, so replace R2 with R2 × RL / (R2 + RL) in the formula. A 10 kΩ load on a 10 kΩ R2 halves it to 5 kΩ.
Yes. The wiper splits the track into R1 and R2, and turning it changes the ratio. That is how a pot sets a volume or feeds a variable voltage to an analog input.









