An LED needs a resistor to limit its current. The resistor drops the voltage left over after the LED's forward voltage.
How to use this calculator
- Enter the supply voltage and the LED forward voltage (from its datasheet).
- Enter the LED current — 10–20 mA for indicator LEDs.
- For LEDs in series, set how many. Use the next standard value up.
Formula
R = (Vs − n × Vf) / IfWorked example
A red LED (2 V, 20 mA) on 5 V: R = (5 − 2) / 0.02 = 150 Ω, dissipating 60 mW — a ⅛ W resistor is fine.
Frequently asked questions
Can one resistor serve several LEDs in parallel?
Avoid it. LEDs never share current evenly; give each LED its own resistor.
Typical forward voltages?
Red ≈ 1.8–2.2 V, yellow/green ≈ 2.0–2.4 V, blue and white ≈ 2.8–3.4 V.
Results are for learning and preliminary design. Check critical work against the relevant codes and a qualified engineer.