LED resistor calculator for one LED or a series string

Enter the supply voltage, the forward voltage of one LED from its datasheet, how many identical LEDs are in series, and the current you want. The page gives the voltage left across the resistor, the exact resistance, and the power in the resistor. It is not a driver design, not for LEDs in parallel on one resistor, and not a choice of standard resistor value.

Your LEDs

Formulas

VR = Vs − N × Vf

R = VR ÷ I

P = VR × I

Where Vs = supply voltage in volts; Vf = forward voltage of one LED in volts; N = number of identical LEDs in series; VR = voltage across the resistor in volts; I = LED current in amperes, entered in milliamperes; R = resistance in ohms; P = power in the resistor in watts, shown in milliwatts.

Forward voltages of the LEDs in series add, and the total must stay below the supply voltage.

Checked examples

One 2 V LED at 20 mA on 5 V leaves 3 V for the resistor, so R = 3 ÷ 0.020 = 150 Ω, dissipating 60 mW.

Three 3.2 V LEDs in series at 20 mA on 12 V leave 2.4 V, so R = 120 Ω and 48 mW.

Inputs: Supply voltage 9 V, LED forward voltage, one LED 2.1 V, LEDs in series 2, LED current 15 mA. Result: Voltage across the resistor 4.800 V, Series resistor 320.0 Ω, Power in the resistor 72.0 mW.

Limits

Forward voltage varies between parts and with current and temperature. Use the datasheet value at your current. The exact resistance is rarely a stock value. Choosing the next standard value up gives slightly less current. Keep the current within the LED's rating, and choose a resistor rated well above the power shown. When the LEDs' total forward voltage is at or above the supply voltage, no series resistor works, so the input is refused. Not for: LEDs in parallel sharing one resistor; constant-current drivers and high-power LEDs on heatsinks; picking the nearest standard resistor value.

Light-Emitting Diodes (LEDs), SparkFun Learn.