electrician.wiki

Electronics calculators

LED resistor calculator

Enter the supply voltage, the LED colour and the current you want. Get the exact resistor, the next standard value up, the current it really gives and the wattage to buy, for one LED or several.

Report a problem with this result

How to use the LED resistor calculator

Enter the supply voltage, pick the LED colour (or choose Custom and type the forward voltage from the datasheet), and set the current. Then say how the LEDs are wired: one LED, several in series sharing one resistor, or several in parallel, each with its own resistor. The calculator returns the exact resistance, the next standard value up in the E12 and E24 series with the current each really gives, the power the resistor dissipates and the rating to buy, plus how much of the supply power ends up as light rather than heat.

Twenty milliamps is the habit from old indicator LEDs and is usually the maximum continuous rating, not a target. Most modern high-efficiency LEDs are clearly visible at 2–10 mA, which also eases the load on a microcontroller pin.

The LED resistor formula

An LED is not a resistor. Below its forward voltage it barely conducts; above it, a small rise in voltage makes the current shoot up. The series resistor turns that steep curve into a predictable current by taking up the difference between the supply and the LEDs:

R=VS−N·VFI

Here N is the number of LEDs in series (1 for a single LED or for each parallel string) and VF is the forward voltage of one LED. The resistor dissipates the leftover voltage times the current, and the share of the supply’s power that reaches the LEDs is set by the voltages alone:

PR=(VS−N·VF)·I
η=N·VFVS

The exact resistance is rarely a standard value, so the calculator rounds up. A slightly larger resistor means slightly less current, which is the safe direction. The real current with the part you fit is I=VRRstd, shown next to each standard value. The arithmetic is plain Ohm’s law applied to the resistor; calculate any other resistor’s current and power the same way.

Typical forward voltage by colour

Forward voltage follows the semiconductor, and the semiconductor sets the colour. These are the typical values the calculator uses at around 20 mA. Treat them as starting points: a datasheet always wins, and the same colour from two makers can differ by a few tenths of a volt.

ColourTypical VfSemiconductor
Red2.0 VAlGaInP
Orange2.0 VAlGaInP
Yellow2.1 VAlGaInP
Green (classic)2.2 VGaP (yellow-green)
Green (true, InGaN)3.0 VInGaN
Blue3.2 VInGaN
White3.2 VInGaN blue chip + phosphor
UV3.4 VInGaN (near-UV)
Infrared1.3 VGaAs or AlGaAs

Worked examples

A red LED on a 5 V rail

The classic first circuit: one red indicator LED from a 5 V supply or USB, at 20 mA.
  1. 1. Voltage left for the resistor

    VR=VS−VF=5V−2V=3V
  2. 2. Exact resistance from Ohm’s law

    R=VRI=3V20mA=150Ω
  3. 3. Next standard value up and the current it gives

    I=VRRE12=3V150Ω=20mA
  4. 4. Resistor power and rating

    PR=VR·I=3V·20mA=60mW
  5. 5. Efficiency: share of the supply power that reaches the LEDs

    η=VFVS=2V5V=40.0 %

A red LED (typical 2.0 V) at 20 mA from 5 V needs 150 Ω, a standard E12 value. A resistor rated ⅛ W is enough.

Three red LEDs in series on 12 V

A string of three red LEDs shares one resistor and runs at 15 mA. Series strings waste less power than one LED per resistor, because the LEDs use more of the supply voltage.
  1. 1. Voltage left for the resistor

    VR=VS−N·VF=12V−3·2V=6V
  2. 2. Exact resistance from Ohm’s law

    R=VRI=6V15mA=400Ω
  3. 3. Next standard value up and the current it gives

    I=VRRE12=6V470Ω=12.77mA
  4. 4. Resistor power and rating

    PR=VR·I=6V·15mA=90mW
  5. 5. Efficiency: share of the supply power that reaches the LEDs

    η=N·VFVS=3·2V12V=50.0 %

3 red LEDs (typical 2.0 V each) in series (6 V in total) at 15 mA from 12 V need 400 Ω; the next E12 value up, 470 Ω, gives 12.8 mA, or 430 Ω from E24 gives 14 mA. A resistor rated ¼ W is enough.

Four blue LEDs in parallel at 5 mA each

A 5 V supply cannot light two blue LEDs in series, so four status LEDs run in parallel, each with its own resistor.
  1. 1. Voltage left for the resistor

    VR=VS−VF=5V−3.2V=1.8V
  2. 2. Exact resistance from Ohm’s law

    R=VRI=1.8V5mA=360Ω
  3. 3. Next standard value up and the current it gives

    I=VRRE12=1.8V390Ω=4.615mA
  4. 4. Resistor power and rating

    PR=VR·I=1.8V·5mA=9mW
  5. 5. Efficiency: share of the supply power that reaches the LEDs

    η=VFVS=3.2V5V=64.0 %

4 blue LEDs (typical 3.2 V each) in parallel each need their own 360 Ω resistor for 5 mA from 5 V; with the next E12 value up, 390 Ω, each LED gets 4.62 mA and the supply delivers 18.5 mA in total. A resistor rated ⅛ W is enough.

A white indicator in a car

A car’s “12 V” system runs at roughly 13.8–14.4 V while the alternator charges the battery, so size for the top of that range.
  1. 1. Voltage left for the resistor

    VR=VS−VF=14.4V−3.2V=11.2V
  2. 2. Exact resistance from Ohm’s law

    R=VRI=11.2V10mA=1.12kΩ
  3. 3. Next standard value up and the current it gives

    I=VRRE12=11.2V1.2kΩ=9.333mA
  4. 4. Resistor power and rating

    PR=VR·I=11.2V·10mA=112mW
  5. 5. Efficiency: share of the supply power that reaches the LEDs

    η=VFVS=3.2V14.4V=22.2 %

A white LED (typical 3.2 V) at 10 mA from 14.4 V needs 1.12 kΩ; the next E12 value up, 1.2 kΩ, gives 9.33 mA. A resistor rated ¼ W is enough.

Resistor values for common supplies

Every cell below is computed by the same engine as the calculator, for a single LED, rounded up to the next E12 value. Use the first table for older or high-power indicator LEDs and the second for modern parts that are bright at low current.

One LED at 20 mA: next E12 value up. * = less than 40 % of the LED voltage left across the resistor, so the current depends heavily on the actual Vf. — = supply too low.
SupplyInfrared1.3 VRed, orange2.0 VYellow2.1 VClassic green2.2 VTrue green3.0 VBlue, white3.2 V
3.3 V100 Ω68 Ω68 Ω56 Ω15 Ω *5.6 Ω *
5 V220 Ω150 Ω150 Ω150 Ω100 Ω100 Ω
9 V390 Ω390 Ω390 Ω390 Ω330 Ω330 Ω
12 V560 Ω560 Ω560 Ω560 Ω470 Ω470 Ω
24 V1.2 kΩ1.2 kΩ1.2 kΩ1.2 kΩ1.2 kΩ1.2 kΩ
One LED at 5 mA: next E12 value up. * = less than 40 % of the LED voltage left across the resistor, so the current depends heavily on the actual Vf. — = supply too low.
SupplyInfrared1.3 VRed, orange2.0 VYellow2.1 VClassic green2.2 VTrue green3.0 VBlue, white3.2 V
3.3 V470 Ω270 Ω270 Ω220 Ω68 Ω *22 Ω *
5 V820 Ω680 Ω680 Ω560 Ω470 Ω390 Ω
9 V1.8 kΩ1.5 kΩ1.5 kΩ1.5 kΩ1.2 kΩ1.2 kΩ
12 V2.2 kΩ2.2 kΩ2.2 kΩ2.2 kΩ1.8 kΩ1.8 kΩ
24 V4.7 kΩ4.7 kΩ4.7 kΩ4.7 kΩ4.7 kΩ4.7 kΩ

Two patterns stand out. On 3.3 V, blue, white and true-green LEDs leave only 100 mV to 300 mV for the resistor, so the current is at the mercy of each LED’s actual forward voltage. And on 24 V the colour hardly changes the value, because the LED uses so little of the supply; that is the cue to put several LEDs in series instead.

Practical pitfalls

  • One resistor for parallel LEDs. LEDs in parallel never share current evenly. The one with the lowest forward voltage takes most of it, warms up, its forward voltage falls further and it takes even more, until it fails; then the next one inherits the full current. Give every parallel LED or string its own resistor, as the calculator does.
  • Forward-voltage spread and temperature. A datasheet that says 3.2 V typical often allows several tenths of a volt either way, and the forward voltage falls by a few millivolts per °C as the LED warms. Little headroom magnifies this: three white LEDs on 12 V at 20 mA need 120 Ω, but if the real forward voltage is 10 % high or low the current lands anywhere from 12 mA to 28 mA. Keep at least 40 % of the LED voltage across the resistor, or use a constant-current driver.
  • The supply is not the label. Size the resistor for the highest voltage the supply reaches. Three red LEDs designed for 20 mA on a nominal 12 V get 330 Ω (18.2 mA); at 14.4 V in a running car the same resistor passes 25.5 mA. Unregulated wall adapters also read high at light load.
  • Microcontroller pins. A GPIO pin can only deliver a limited current, with limits per pin and per port that are often well below 20 mA. For more current, drive the LED through a transistor. A 3.3 V pin cannot properly drive a white or blue LED through a resistor at all: there is almost no voltage left for the resistor.
  • Reverse voltage. LEDs typically tolerate only about 5 V in reverse. On AC, or anywhere the polarity can be swapped, put an ordinary diode in anti-parallel across the LED, or in series with it.
  • PWM dimming and high-power LEDs. With PWM, the resistor sets the peak current and the duty cycle sets the average. LEDs rated 350 mA and above need a constant-current driver and a heatsink; a resistor wastes too much power and cannot hold the current as the LED heats. A 555 timer set up as a PWM oscillator is a common way to blink or dim small LEDs.

Reading the resistor you pulled from the drawer is the last step: decode its colour bands to confirm the value. And if you need a reference voltage rather than a current, that is a job for a voltage divider, not an LED resistor.

Method and verification

The calculator subtracts the forward voltage of the string from the supply and applies Ohm’s law to what is left, in double precision, displaying three or four significant figures. Standard values are the next E12 and E24 values at or above the exact result (IEC 60063 preferred numbers, listed in the E-series resistor value tables), so the real current is never above the target. Resistor power is the dissipation at the design current, and the suggested rating is the smallest of ⅛, ¼, ½, 1 and 2 W that is at least twice that. Parallel arrangements are computed per string, with one resistor each; series arrangements multiply the forward voltage by the number of LEDs and refuse a supply that cannot exceed it.

Test cases include the default red LED on 5 V (150 Ω exact, 150 Ω E12, ⅛ W), three red LEDs in series on 12 V, four blue LEDs in parallel, a 14.4 V car supply, an energy-balance check that LED power plus resistor power equals supply power across every colour and arrangement, and supplies too low to light the string.

Typical forward voltages are a starting point; the LED’s datasheet takes precedence. Updated 2026-10-14. Found a problem? Report it and we log every fix publicly.

Questions people ask

What resistor do I need for an LED on 5 V?
For a red LED at 20 mA, 150 Ω, itself a standard value. For a white or blue LED at 20 mA, 90 Ω exact, so 100 Ω from E12 or 91 Ω from E24. Many modern LEDs are bright enough at 5 mA, where a red LED needs 680 Ω.
What resistor do I need for an LED on 12 V?
A red LED at 20 mA needs 500 Ω: use 560 Ω (E12) or 510 Ω (E24) rated ½ W, since it dissipates 200 mW. Putting several LEDs in series on 12 V wastes far less power than one LED per resistor.
Can several LEDs share one resistor?
Yes if they are in series: one resistor per string, sized for the total forward voltage. No if they are in parallel: the LED with the lowest forward voltage hogs the current and fails first. Give each parallel LED its own resistor.
What happens if I use a bigger resistor than calculated?
The LED gets less current and is dimmer, which is safe. The current is (supply voltage − forward voltage) ÷ resistance, so doubling the resistor roughly halves the current. A smaller resistor than calculated over-drives the LED.
How much current should an LED run at?
Check the datasheet: standard 3 mm and 5 mm indicator LEDs are typically rated 20 mA continuous, some 30 mA. That is a maximum, not a target. Modern high-efficiency LEDs are clearly visible at 2–10 mA, which also runs them cooler and longer.
What wattage resistor do I need for an LED?
Work out the resistor’s dissipation, (supply voltage − LED voltage) × current, and buy a part rated at least twice that. A red LED at 20 mA on 5 V puts 60 mW into the resistor, so ⅛ W is enough; the calculator does this for every result.