LED Series Resistor Calculator

Answer

R = (VS − n × VF) / IF. The resistor drops the leftover voltage at the LED current you chose. Power in that resistor is P = (VS − n × VF) × IF. Pick the nearest E12, E24 or E96 value and recompute the current; a smaller resistor means a brighter, hotter LED.

Calculator

Exact R
150 Ω
Nearest E24
150 Ω
Current with nearest
20 mA
Headroom
3 V
Resistor power
60 mW
  • pass Supply vs forward voltage: Headroom is 3.000 V.
  • pass Resistor dissipation: The resistor dissipates 0.060 W at the design current. Use a part rated at least 2× that.

How it works

An LED is a diode. Once it is forward-biased, current rises steeply with voltage, so a resistor (or a current source) has to set IF. The resistor sees whatever voltage is left after n × VF.

The calculator solves that leftover voltage for R, then snaps to the nearest preferred value you select and shows the current that value actually produces. A Fail on headroom means the supply cannot forward-bias the string. A Warn or Fail on power means the leftover voltage times IF is too much for a small chip resistor.

Parameters used on this page

Parameter Value Source
Series resistor R = (VS − n·VF) / IF Ohm's law around one LED string
Resistor power P = (VS − n·VF) × IF Joule's law; the leftover voltage times the string current
Current with a preferred value IF,actual = (VS − n·VF) / Rnearest Same loop, with the E-series part you can buy
Typical red / green / blue VF ≈ 1.8–2.2 V / 2.0–3.2 V / 2.8–3.4 V at rated current Order-of-magnitude ranges from common indicator LED datasheets; use the VF from your part
Preferred values IEC 60063 E12 / E24 / E96 IEC 60063
Power-rating rule of thumb Use a resistor rated at least 2× the calculated dissipation Allows for VF spread, supply tolerance and a hot board

Worked example

A 5.0 V supply, one red LED with VF = 2.0 V, IF = 20 mA. Headroom = 3.0 V, so R = 3.0 / 0.020 = 150 Ω, which is already an E24 value. The resistor dissipates 60 mW; a 125 mW 0603 or a 250 mW through-hole part is enough. Two of those LEDs in series would leave only 1.0 V of headroom and need 50 Ω.

Pitfalls

FAQ

How do I calculate an LED resistor?

Subtract the LED forward voltage (times the number of LEDs in series) from the supply, then divide by the current in amperes. That resistance goes in series with the string.

What resistor do I need for a 5 V red LED at 20 mA?

With VF = 2.0 V the exact value is 150 Ω. That is a standard E24 part and dissipates 60 mW.

Can I run several LEDs from one resistor?

Yes if they are in series and the supply is high enough. Do not parallel LEDs on a single resistor unless they are a matched array designed for it.

Why is my LED dimmer than the calculation?

The nearest preferred value may be larger than the exact resistance, VF may be higher than you assumed, or the supply may be sagging.

Related

Sources