An LED (light-emitting diode) has almost no internal resistance of its own — without something limiting the current, it will draw as much as the power supply can deliver and burn out almost instantly. A series resistor (also called a current-limiting resistor) is placed in the circuit specifically to hold the current at a safe level. This tool calculates the exact value from your supply voltage, the LED's forward voltage, and your target current, then rounds it to a standard resistor value and shows you the matching color code.
How do you calculate the right resistor value for an LED?
A complete guide — with formulas and examples — to sizing an LED current-limiting resistor, rounding to a standard value, and checking the resistor's power rating.
Common LED + supply voltage combinations
Frequently used supply voltage / LED color combinations at a 20mA target current, with the resulting resistor value already rounded up to the nearest standard (±5%) value.
| Supply | LED color (Vf) | Calculated | Standard value |
|---|---|---|---|
| 5V (USB) | Red (2.0V) | 150 Ω | 150 Ω |
| 5V (USB) | Blue/White (3.2V) | 90 Ω | 91 Ω / 100 Ω |
| 9V (battery) | Red (2.0V) | 350 Ω | 360 Ω |
| 9V (battery) | Green (2.1V) | 345 Ω | 360 Ω |
| 12V | Red (2.0V) | 500 Ω | 510 Ω |
| 12V | Blue/White (3.2V) | 440 Ω | 470 Ω |
LED resistor terms glossary
Short definitions of the core terms used in LED current-limiting resistor sizing.
In-depth guides
Step-by-step walkthroughs of the most commonly confused LED resistor questions.
How is a single LED resistor value calculated? (step by step)
Step 1: Find the "extra" voltage the resistor must absorb → 9V supply − 2V LED = 7V.
Step 2: Convert your target current to amps → 20mA = 0.02A.
Step 3: Apply Ohm's law → 7V ÷ 0.02A = 350 Ω.
Step 4: Round up to the nearest standard value → 360 Ω (E24) or 390 Ω (E12).
You can see this instantly by entering 9, 2.0, and 20 into the calculator above.
Sizing the resistor for LEDs in series
When LEDs share the same current path (series), their forward voltages stack. Three 2V red LEDs need 6V just to turn on, so a 9V supply only has 3V left for the resistor: (9 − 6) / 0.02 = 150 Ω. If the combined LED forward voltage is close to or exceeds the supply voltage, there won't be enough headroom to limit the current safely — in that case, either reduce the number of LEDs in series or increase the supply voltage.
Set "Number of LEDs in series" in the calculator above to handle this automatically.
Checking the resistor's power rating
Step 1: Take the calculated (or standard, rounded) resistor value and the target current.
Step 2: Apply P = I² × R — for 20mA through 360 Ω: 0.02² × 360 = 0.144 W.
Step 3: Apply a safety margin (2× is common) → look for a resistor rated 0.29 W or higher.
Step 4: A standard 1/4W (0.25W) resistor is borderline here — a 1/2W part would be the safer pick.
The calculator above shows this power figure directly in the result card.
Frequently asked questions
What resistor value do I need for an LED?
Why do you round the resistor value up, not down?
What is a typical LED forward voltage?
What current should I use for a standard 5mm LED?
How do I calculate the resistor for multiple LEDs in series?
What power rating resistor do I need for an LED circuit?
Can I use this calculator's result with the resistor color code calculator?
Methodology & sources
Sources: Ohm's law · IEC 60063 (E-series preferred values) · typical LED forward-voltage ranges from common manufacturer datasheets. Last updated: July 28, 2026. Results are for informational purposes only; for critical or precision applications, refer to the LED's official datasheet.