Free calculator
LED Resistor Calculator
An LED needs a resistor in series to limit its current. Take the LED’s forward voltage away from the supply voltage, then divide what is left by the current you want: that is the resistor in ohms. This calculator also rounds up to a standard E12 value and tells you the power rating to buy.
Result
The calculation
- Voltage across the resistorsupply minus the LED voltage(s)
- 3 V
- Exact resistance
- 150 Ω
- Power in the exact resistor
- 60 mW
With the E12 resistor
- Real LED current
- 20 mA
- Power in the resistor
- 60 mW
- Resistor rating to buyat least twice the power, so it stays cool
- 1/8 W
- Power used by the LED
- 40 mW
The formula
What each letter means
- Resistance (Ω · ohm) : How strongly something opposes current.
- Supply voltage (V · volt) : The source or supply voltage.
- Number of LEDs in series (no unit) : How many LEDs share one resistor, connected one after another. A count, so no unit.
- Forward voltage (V · volt) : The voltage a diode or LED drops when it conducts: about 0.7 V for silicon, about 2 V for a red LED. Datasheets usually write it V_F.
- Current (A · ampere) : How much charge flows each second.
- Power in the resistor (W · watt)
How it works
An LED is not like a light bulb. Once the voltage across it reaches its forward voltage, the current rises very steeply, so with no resistor it would take far too much current and burn out. The resistor soaks up the voltage the LED does not use. With a 5 V supply and a red LED that drops 2 V, the resistor has to drop the other 3 V.
Resistors are sold in standard values. This page uses the E12 series (1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8 and 8.2, times ten, hundred and so on). It always rounds up to the next value, never down: a slightly bigger resistor means a slightly lower current, which is safe, while a smaller one would push the current above what you asked for.
The rating it suggests is the smallest standard size (1/8, 1/4, 1/2, 1 or 2 W) that is at least twice the power the resistor really dissipates, so it stays cool. Forward voltages are typical values that change by a few tenths of a volt between makers. If less than 0.5 V is left for the resistor, tiny differences in the supply or the LED change the current a lot, so the brightness will vary.
Worked example
- A 5 V supply, a red LED (typically 2 V) and a wanted current of 20 mA. The resistor must drop 5 V − 2 V = 3 V.
- R = 3 V ÷ 20 mA = 150 Ω. That is already an E12 value, so use 150 Ω.
- The resistor turns I² × R = (20 mA)² × 150 Ω = 60 mW into heat. Twice that is 120 mW, so a 1/8 W resistor is enough.
- Now a 12 V supply with a white LED (typically 3.2 V) at 20 mA. The resistor drops 8.8 V, so R = 8.8 V ÷ 20 mA = 440 Ω. That is not an E12 value, so go up to 470 Ω.
- With 470 Ω the current is 8.8 V ÷ 470 Ω = 18.72 mA, a little under 20 mA, and the resistor dissipates 164.8 mW. Twice that is 329.5 mW, so buy a 1/2 W resistor.
Common questions
Can I use a bigger resistor than the calculator says?
Yes. A bigger resistor lowers the current, so the LED is dimmer but safe. A smaller resistor raises the current above your target and can shorten the LED’s life or burn it out. That is why the calculator rounds up and never down.
Why does the resistor need a power rating?
The resistor turns the voltage it drops into heat: power = current × current × resistance. A tiny 1/8 W resistor is fine for a 20 mA indicator on 5 V, but on a high supply the same resistor would get too hot. The rating shown is at least twice the real power, so the part runs cool.
Where do I find my LED’s forward voltage?
On its datasheet, listed as the forward voltage at a test current. If you do not have one, the colour presets give typical values: about 2 V for red and orange, 2.1 V for yellow, 2.2 V for standard green and about 3 V to 3.2 V for blue, bright green and white. Blue and white LEDs need a supply well above 3.2 V.
Try it live
- Try it live in lesson 0.1: Your First Circuit: Voltage, Current & Resistance
- Try it live in lesson 3.1: Diodes & LEDs: Forward Voltage and the I-V Curve
- Component guide: LED
- Component guide: Resistor