Back to Tools

LED Resistor Calculator

Find the series resistor for one LED or a string of them: exact value, the next standard resistor, the real current, and the wattage to buy.

Supply and LEDs

Round up to

Resistor per string

160 Ω
Next E24 value up from the exact 155 Ω
Current with this resistor
19.4 mA
Power in the resistor
60.1 mW
Rating to buy (2× margin)
1/8 W
Total current from the supply
19.4 mA
Total power
96.9 mW
Share that reaches the LEDs
38%
R = (Vs − n × Vf) / I
R = (5 V − 1 × 1.9 V) / 20 mA = 155 Ω

If the LEDs sit at the datasheet's maximum Vf (2.3 V), the current drops to 16.9 mA.

Circuit

LED circuit: a resistor in series with each string of LEDs+5 VGND160 Ω

How to calculate an LED resistor

An LED drops a roughly fixed voltage (its forward voltage, Vf) and lets through as much current as the circuit allows, so it needs something to set the current. A series resistor takes whatever voltage the LEDs don't, and Ohm's law gives its value:

R = (Vs − n × Vf) / I

Vs is the supply, n the number of LEDs in series, Vf the forward voltage of one LED and I the current you want. The resistor's power is P = I² × R; buy one rated for at least twice that.

Round up to the next standard value, never down. A bigger resistor means a little less current and a little less light, which you won't see. A smaller one pushes the LED past the current you picked.

On the current: 20 mA is the classic figure because that's where 5 mm LEDs are specified, but modern LEDs are bright enough as indicators at 2 to 10 mA. Less current means less heat, longer life and a resistor nobody has to think about.

Worked examples

5 V LED resistor

A red LED (1.9 V) at 20 mA from USB: (5 − 1.9) / 0.02 = 155 Ω. The next E24 value up is 160 Ω, giving 19.4 mA and 60 mW in the resistor, so a 1/8 W (0805) part is fine.

12 V LED resistor

One white LED (3.3 V) at 20 mA: (12 − 3.3) / 0.02 = 435 Ω, so 470 Ω, 18.5 mA and 161 mW burnt in the resistor (buy 1/2 W). Three in series instead: (12 − 9.9) / 0.02 = 105 Ω, so 110 Ω and only 40 mW, for three times the light.

Arduino LED resistor

The 220 Ω in every starter kit gives (5 − 1.9) / 220 = 14 mA with a red LED on a 5 V Uno pin. The ATmega328P's absolute maximum is 40 mA per pin (datasheet, Absolute Maximum Ratings), so 220 Ω to 1 kΩ is a safe range. On a 3.3 V board like an ESP32 or a Pico, a red LED with 150 Ω to 330 Ω works (4 to 9 mA, inside the 12 mA a Pico pin is specified for in the RP2040 datasheet); blue and white LEDs need about 3.3 V themselves and stay dim or dark, so power them from 5 V through a transistor.

LED forward voltage by colour

ColourTypical VfMax VfMeasured atMax currentPart
Red1.9 V2.3 V10 mA30 mAWP7113ID (GaAsP/GaP)
Super bright red1.85 V2.5 V20 mA30 mAWP7113SRD/D (GaAlAs)
Orange1.95 V2.3 V10 mA25 mAWP7113ND (GaAsP/GaP)
Yellow1.95 V2.4 V10 mA30 mAWP7113YD (GaAsP/GaP)
Green (yellow-green)2 V2.4 V10 mA25 mAWP7113GD (GaP)
True green3.2 V4 V20 mA30 mAWP7113ZGC/G (InGaN)
Blue3.3 V4 V20 mA30 mAWP7113QBC/D (InGaN)
White3.3 V4 V20 mA30 mAWP7113QWC/D (InGaN)

Source: Kingbright WP7113 series datasheets (5 mm round through-hole LEDs), electrical and absolute maximum ratings at 25 °C, forward voltage tolerance ±0.1 V. Red, orange, yellow and yellow-green are older GaAsP, GaAlAs and GaP chips at about 2 V; blue, white and true green are InGaN at 3 to 4 V. Other makers and SMD packages are close but not identical, so use your own LED's datasheet when you have it.

Why each string gets its own resistor

LEDs in series share one current, so one resistor per string is enough. LEDs in parallel do not share nicely: the one with the lowest Vf takes most of the current, runs hotter, its Vf drops further and it takes even more. With one resistor per string each string's current is set on its own. That's why this calculator gives a resistor per string and multiplies by the number of strings for the totals.

Putting several LEDs in series is also more efficient: less of the supply is burnt in the resistor. Leave at least a volt or two across the resistor, though, or small differences in Vf swing the current a lot.

Questions people ask

What resistor do I need for an LED on 5 V?
For a red, yellow or green LED at 20 mA, 150 Ω to 160 Ω; at 10 mA, about 330 Ω. For blue or white, 100 Ω at 17 mA or 180 Ω at 9 mA.
What resistor do I need for a 12 V LED?
510 Ω for one red LED at 20 mA, or 470 Ω for one white LED, both rated 1/2 W. Many "12 V LEDs" and strips already have the resistor built in; check before adding another.
Can I run an LED without a resistor?
Only from a constant-current driver, or a coin cell whose internal resistance limits the current. From a regular supply the current rises until the LED fails.
Does the resistor go before or after the LED?
Either. In a series circuit the same current flows everywhere, so the resistor works on the anode or the cathode side.
What about high-power LEDs?
Above about 100 mA a resistor wastes too much power and the current drifts as the LED heats up. Use a constant-current LED driver instead.

Related tools and guides

Describe a circuit. Get a board you can order.

GrandpaCAD's chat picks real parts, draws the schematic, routes the PCB and checks it against JLCPCB's rules. You get Gerbers, BOM, pick-and-place, a KiCad project and a 3D board, plus a printed case if you want one.

"USB-powered board with 3 LEDs and the right resistors"

3 free generations, no card required