A voltage divider is an electrical circuit which divides the input voltage. The output voltage is a portion of the input voltage and the value of the output is dependent on the resistor ratio in the circuit. The schematics on the right includes two resistors.

The output of the circuit is calculated by the following equation:

U_{2} = U_{1} ⋅ (R_{2} / (R_{1} + R_{2}))

where:

- U
_{1}is input voltage - U
_{2}is output voltage - R
_{1}and R_{2}are resistors

The equation is derived from Ohm's law

where:

I = U_{1} / (R_{1} + R_{2})

and:

U_{2} = I ⋅ R_{2}

A voltage divider is very often used together with resistive sensors (photo resistor, thermistor etc.) where one of the resistors is replaced by the resistive sensor. In this way, the change of the resistance of the sensor is easily transformed to the voltage change, which is compatible with the microcontroller's analogous input.