π‘ LED Series Resistor Calculator
Find the correct current-limiting resistor for your LED circuit
Quick presets β common LED colours:
Why Every LED Needs a Series Resistor (And How to Pick the Right One)
An LED without a current-limiting resistor is a ticking clock. Give it a few seconds of unprotected voltage and it either glows brilliantly for a moment and burns out, or delivers a quiet pop and goes dark forever. The fix is simple β a single resistor in series β but choosing the wrong value means either a dim LED or a fried one. This calculator solves that in seconds, and the explanation below makes sure you understand exactly why the numbers work out the way they do.
The Core Problem: LEDs Are Not Light Bulbs
A resistor obeys Ohm's Law: double the voltage, double the current. An LED doesn't work that way. It has a forward voltage (Vf) β a threshold below which it barely conducts and above which current climbs steeply and nonlinearly. Once the supply voltage exceeds Vf, even a small additional voltage difference can drive current through the LED to destructive levels.
This is why you cannot connect an LED directly to a 5 V supply and hope the built-in resistance saves it. There essentially is no built-in resistance. The LED's datasheet specifies a maximum forward current (If max) β commonly 20 mA for standard 5 mm through-hole LEDs, 2β10 mA for many SMD types β and crossing that threshold permanently degrades the junction, shortening life or destroying it outright.
The series resistor creates a predictable, stable voltage drop that absorbs the difference between your supply and the LED's forward voltage, keeping current in the safe operating zone.
The Formula Behind the Calculator
Kirchhoff's Voltage Law states that voltages around a closed loop must sum to zero. In a simple LED circuit (power supply β resistor β LED β ground), this gives:
Vs = V_R + Vf
Where Vs is supply voltage, V_R is the voltage across the resistor, and Vf is the forward voltage across the LED. Rearranging: V_R = Vs β Vf. Then applying Ohm's Law to the resistor: R = V_R Γ· If, which expands to:
R = (Vs β Vf) Γ· If
That's the entire foundation. If your 5 V supply feeds a red LED (Vf β 2.0 V) at 20 mA:
R = (5 β 2.0) Γ· 0.020 = 3.0 Γ· 0.020 = 150 Ξ©
At 9 V with a blue LED (Vf β 3.2 V) at 10 mA:
R = (9 β 3.2) Γ· 0.010 = 5.8 Γ· 0.010 = 580 Ξ©
Choosing a Standard Resistor Value
Resistors don't come in every value. They're sold in standard series β E12, E24, E96 β each with a fixed set of values per decade. The E24 series (24 values per decade, roughly 5% tolerance) covers values like 100, 110, 120, 130, 150, 160, 180 Ξ© and so on.
A critical decision: when the exact calculated value falls between two standard values, do you round up or down? Always round up. A higher resistance means slightly less current through the LED β it will be marginally dimmer but will live longer. Rounding down delivers more current than intended; on a steady diet of 25 mA when the LED is rated for 20 mA, junction temperature rises and operating life shrinks from tens of thousands of hours to mere hundreds.
The calculator above applies this rule automatically: it finds the next E24 value at or above your exact calculated resistance and shows you both the ideal number and the safe standard value to actually buy.
Resistor Power Dissipation β The Overlooked Detail
Resistors also have power ratings. Exceed the rating and the resistor gets hot, drifts in value, or fails. The power dissipated by a series resistor is:
P = (Vs β Vf) Γ If
For the 5 V / 2.0 V / 20 mA example: P = 3.0 V Γ 0.020 A = 60 mW. A standard ΒΌ W (250 mW) resistor handles that with enormous headroom. But at 12 V with a 2.0 V LED at 20 mA: P = 10 V Γ 0.020 A = 200 mW. You're already at 80% of a ΒΌ W resistor's rated capacity, so a Β½ W part is the right call. The calculator recommends a part rated at 2Γ the actual dissipation β an industry-standard safety margin that accounts for ambient temperature and resistor self-heating.
Forward Voltage Varies by Colour
LED forward voltage is a semiconductor property that depends on the material's bandgap energy, which determines the colour of light emitted. Approximate typical values:
- Infrared (850β940 nm): 1.2β1.8 V
- Red (620β750 nm): 1.8β2.2 V
- Orange / Yellow (560β620 nm): 2.0β2.4 V
- Green (495β560 nm): 2.0β3.5 V (wide range due to material choices)
- Blue (450β495 nm): 2.8β3.7 V
- White (phosphor-converted): 3.0β3.6 V
- UV (380β400 nm): 3.5β4.0 V
Always use the value from the specific LED's datasheet if available. The typical values above are useful starting points but vary between manufacturers and even production batches. If you use a value that's 0.3 V off from the real Vf, your actual LED current will differ from intended β usually not catastrophically for a 5% error, but worth noting.
Multiple LEDs in Series
Running multiple LEDs from one resistor is possible if they're wired in series (not parallel). Simply add all forward voltages together and use the combined sum as your Vf in the formula:
R = (Vs β (Vf1 + Vf2 + Vf3)) Γ· If
Three red LEDs (each 2.0 V) on a 12 V supply at 15 mA: R = (12 β 6.0) Γ· 0.015 = 400 Ξ© β use 390 Ξ© or 430 Ξ© E24 value. Make sure your supply voltage is comfortably above the total forward voltage sum or the LEDs won't light at all. Parallel wiring without individual resistors is generally discouraged β small Vf mismatches between LEDs cause one to hog all the current.
Practical Tips Before You Build
When prototyping, start with a slightly higher resistor value than calculated and work your way down if the LED appears too dim. Measure actual current with a series ammeter if precision matters. For battery-powered designs, lower LED current (5β10 mA instead of 20 mA) dramatically extends battery life with only a modest reduction in perceived brightness, because human vision responds logarithmically β half the current doesn't look half as bright.
In microcontroller projects where a GPIO pin directly drives an LED, check the pin's output current limit (typically 20β40 mA for most AVR, STM32, or ESP32 pins, but sometimes only 8 mA for certain families). The series resistor calculation remains identical β the supply voltage is the logic-high output voltage of the pin, not the main rail.
The formula is simple, the math is fast, and getting it right the first time saves both components and frustration. Use this calculator each time and your LEDs will last as long as the rest of your circuit.