Skip to content
STEMForge Tuition

Free tool · Electronics

LED Resistor Calculator

Enter the supply voltage and your LED's forward voltage and current to find the series resistor it needs, the nearest value you can actually buy, and the power it will dissipate.

Resistor value350 Ω
Nearest standard (E12)390 Ω
Power dissipated126 mW

The formula

The resistor has to drop whatever voltage is left over once the LED's forward voltage is subtracted from the supply, at the current you want the LED to run at:

R=VsVfIfR = \dfrac{V_s - V_f}{I_f}

Vs is the supply voltage, Vf the LED's forward voltage, and If the target forward current.

Once you know the resistor's actual value, its power dissipation tells you what wattage rating to buy:

P=(VsVf)×IP = (V_s - V_f) \times I

Power dissipated in the resistor at the current it's actually carrying.

Worked example

A red LED (Vf = 2 V) needs to run at 20 mA from a 9 V supply.

R=920.02=70.02=350 ΩR = \dfrac{9 - 2}{0.02} = \dfrac{7}{0.02} = 350\ \Omega

Subtract the LED's forward voltage from the supply, then divide by the target current in amps.

Rstandard=390 ΩR_{\text{standard}} = 390\ \Omega

350 Ω isn't a standard value — round up to the nearest E12 value, 390 Ω, to keep current at or below 20 mA.

I=739017.9 mAI = \dfrac{7}{390} \approx 17.9\ \text{mA}

Recalculate the actual current with the standard resistor value in place.

P=7×0.01790.126 WP = 7 \times 0.0179 \approx 0.126\ \text{W}

A quarter-watt (0.25 W) resistor comfortably covers this.

Frequently asked questions

Why does an LED need a resistor at all?

An LED's resistance drops sharply once it starts conducting, so without something to limit current, it draws far more than its rated forward current and burns out almost immediately. The series resistor absorbs the extra supply voltage and sets the current to a safe level.

Where do I find an LED's forward voltage and current?

On the datasheet, if you have one — look for "forward voltage" (Vf) and "forward current" (If) in the electrical characteristics table. Without a datasheet, typical forward voltages are around 1.8–2.2 V for red, orange and yellow LEDs and 2.8–3.4 V for green, blue and white, with 20 mA a common default forward current for standard 5 mm LEDs.

What happens if the resistor value is too high or too low?

Too high, and less current flows than intended, so the LED is dimmer than it should be — not damaging, just underpowered. Too low, and more current flows than the LED is rated for, which shortens its life or destroys it outright, especially if the supply is much higher than the forward voltage.

Should I round the calculated resistance up or down to a standard value?

Round up. A slightly higher resistance gives slightly less current than your target, which is safe; rounding down pushes the LED's current above what you calculated, which is the situation you're trying to avoid.

Does the resistor go before or after the LED?

Either — in a simple series circuit, current is the same at every point, so a single resistor limits current whether it sits between the supply and the LED or between the LED and ground.

Can I use one resistor for several LEDs?

For LEDs in series (all in one loop, sharing the same current), yes — add up all their forward voltages and use the total in place of a single Vf. For LEDs in parallel, no: each branch needs its own resistor, since parallel LEDs rarely share current evenly without one.

Want this explained live?

No charge for the first call.