The voltage divider formula
Two resistors in series share the input voltage in proportion to their resistance. The voltage across the bottom resistor, R2, is:
Vout = Vin × R2 / (R1 + R2)
So if R2 is twice as big as R1, it gets two thirds of the voltage. The current through both resistors is the same: Vin divided by R1 + R2.
When to use a voltage divider
- Reading a higher voltage with an ADC. For example, measuring a 12 V battery with a microcontroller pin that only accepts 3.3 V.
- Logic level shifting, one way. Bringing a 5 V output down to 3.3 V for a slower signal such as a UART receive line.
- Reading sensors. Light dependent resistors, thermistors and potentiometers are all voltage dividers in disguise.
When not to use one
A voltage divider is not a power supply. As soon as you draw current from Vout, the output voltage drops, because the load sits in parallel with R2. Try adding a load in the calculator above to see how much. To power something, such as a motor, an LED strip or a whole board, use a voltage regulator or a buck converter instead.
Choosing resistor values
Lots of pairs give the same ratio, so pick the size based on the job:
- Lower values (1 kΩ to 10 kΩ) hold their voltage better under load and resist noise, but waste more current.
- Higher values (100 kΩ and up) waste almost nothing, which suits battery projects, but can upset some ADCs that expect a low source resistance. A 100 nF capacitor across R2 helps.
- 10 kΩ to 100 kΩ is a good default for reading voltages with a microcontroller.
Need to check the colour bands on the resistors you have? Use the resistor colour code calculator.