LED Resistor Calculator
Size the current-limiting resistor for an LED from supply voltage, LED forward voltage and current.
Resistor150.0Ω
Resistor power0.060W
The resistor drops the voltage the LED doesn't use, at the current you choose. R = (Vsupply − Vled) ÷ I, with I in amps (mA ÷ 1000). For a 5 V supply, a 2 V red LED at 20 mA: R = (5 − 2) ÷ 0.02 = 150 Ω. The resistor dissipates P = (Vsupply − Vled) × I = 3 × 0.02 = 0.06 W, so a standard 1/4 W resistor is fine. Round up to the next standard value (e.g. 150 Ω or 180 Ω).
Questions
How do I calculate an LED resistor?
Subtract the LED's forward voltage from the supply voltage, then divide by the current in amps: R = (Vsupply − Vled) ÷ I. For 5 V, a 2 V LED at 20 mA, R = 3 ÷ 0.02 = 150 Ω.
What resistor power rating do I need?
The resistor dissipates (Vsupply − Vled) × current. At 3 V and 20 mA that is 0.06 W, so a common 1/4 W (0.25 W) resistor has plenty of headroom.