LED resistor calculator
An LED needs a current limit. The resistor drops the difference between the supply and the LED forward voltage.
V
V
Red 1.8 to 2.2; green 2.0 to 3.0; blue and white 2.8 to 3.6.
mA
Series resistor
145.00ohm
- Power dissipated in the resistor
- 0.058
- Voltage across the resistor
- 2.900 V
- Power in the LEDs
- 0.042
- Share of power reaching the LEDs
- 42.00 %
- Supply is high enough
- 1
Show the working
- Supply voltage = 5
- LED forward voltage = 2.1
- Desired current = 20
- LEDs in series = 1
- total_vf = 2.1 * 1 = 2.1
- Voltage across the resistor = 5 - 2.1 = 2.9
- i_a = 20 / 1000 = 0.02
- Series resistor = 2.9 > 0 ? 2.9 / 0.02 : 0 = 145
- Power dissipated in the resistor = 2.9 * 0.02 = 0.058
- Power in the LEDs = 2.1 * 0.02 = 0.042
- Share of power reaching the LEDs = 5 > 0 ? 2.1/5*100 : 0 = 42
- Supply is high enough = 2.9 > 0 ? 1 : 0 = 1
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- R = (Vsupply - n x Vf) / I
- P = (Vsupply - n x Vf) x I
Choose the next resistor value above the calculated one: a slightly lower current is safe, a higher one is not.
A resistor is a wasteful way to drive high-power LEDs. Above a watt or so, use a constant-current driver.