LED Resistor Calculator

Current-limiting resistor value, standard value, and color code for LEDs

Calculate the series current-limiting resistor for an LED. Enter the supply voltage, the LED's forward voltage (Vf) and current (If), and how many LEDs are in series/parallel — you get the ideal resistance, the E24/E12 standard values, power dissipation, and the color bands. 100% in your browser.

Result

Recommended resistor (E24)
—

How it's calculated

  • Resistance R = (supply voltage − total LED forward voltage) ÷ forward current.
  • Putting several LEDs in series adds their forward voltages; one resistor limits the whole string.
  • For identical strings in parallel, give each string its own resistor. Sharing one resistor lets current hog one branch.
  • The standard value is rounded up from the ideal, so the actual current never exceeds the target — safer for the LED.
  • Pick a resistor rating of at least 2× the dissipation. A 1/4 W resistor means keeping it under 62 mW.

Notes

  • The preset Vf / If are typical values. Always check the datasheet for your specific LED.
  • Vf shifts a little with current — use the Vf at your target current for accuracy.
  • When the supply is close to the LED forward voltage (low headroom), a resistor is a poor fit — use a constant-current circuit.
  • Everything is calculated inside this browser; nothing is uploaded to any server.

About LED Resistor Calculator

The series resistor for an LED is R = (Vs − n·Vf) ÷ I, where Vs is the supply voltage, Vf the forward voltage of one LED, n the number of LEDs in series in one string, and I the current you want. It is Ohm's law applied to the voltage left over for the resistor. Alongside the ideal value, the calculator gives the resistor's dissipation, a recommended power rating (the smallest standard rating at least twice the dissipation), the efficiency, and the nearest E12 and E24 values you can actually buy, with the current each one produces.

Standard values are always rounded up from the ideal. A larger resistor can only push the current slightly below target, never above it, so rounding in that direction never overdrives the LED.

Why an LED needs a resistor at all

Unlike a filament bulb, an LED's current climbs steeply with small increases in voltage. The red LED curve in Kingbright's WP117EGWT datasheet shows about 10 mA at 1.9 V and about 30 mA at 2.1 V: tripling the current for a 0.2 V change. Connect an LED straight across a voltage source and nothing sets the current. The absolute maximum DC current for that part is 30 mA.

A series resistor adds a gentle slope to that steep curve. Because the voltage across the resistor is proportional to current, a small shift in the LED's voltage only changes the current in proportion to that shift relative to the resistor's voltage. That is why the resistor needs a reasonable share of the supply for the current to stay stable.

Vf is a range, not a number

Datasheets give a typical and a maximum forward voltage. For the WP117EGWT at 20 mA, the red (GaAsP/GaP) chip is 2.0 V typical and 2.5 V maximum, the green (GaP) chip 2.2 V typical and 2.5 V maximum. Vf also falls by about 2 mV for every degree Celsius the LED warms up, and two LEDs from the same bag will not match exactly.

The presets in this calculator (red 2.0 V, blue and white 3.2 V and so on) are common typical values, not guarantees. Green in particular depends on the chip material: older yellow-green GaP LEDs sit around 2.2 V, while modern bright true-green InGaN parts are around 3 V. The Green preset uses the InGaN figure of 3.0 V, and its label notes the older GaP value. Replace the preset with the figure from your own datasheet.

If the real Vf is higher than you assumed, the current simply drops. A red LED on 5 V with 150 Ω gives 20 mA at Vf = 2.0 V, but if that particular LED sits at its 2.5 V maximum, the current is 2.5 ÷ 150 ≈ 16.7 mA: slightly dimmer and perfectly safe. The dangerous mistake is the opposite one, assuming a higher Vf than the part really has, which makes the resistor too small.

What happens when there is too little headroom

Driving a 3.0 V LED at 20 mA from a 3.3 V rail leaves only 0.3 V for the resistor, giving 15 Ω. The arithmetic is right but the circuit is fragile: if the LED's Vf is really 3.1 V, the current is 0.2 ÷ 15 ≈ 13 mA, and at 3.2 V about 7 mA. The calculator warns when the resistor gets less than 15% of the supply voltage.

The fixes are a higher supply (use the 5 V rail), fewer LEDs in series, or a constant-current driver instead of a resistor. The opposite extreme wastes power: one LED on 12 V turns most of the energy into heat in the resistor. Three white LEDs in series on 12 V leave only 2.4 V across the resistor, and 80% of the power goes into the LEDs.

Choosing a standard value and a power rating

Resistors are sold in preferred-number series defined by IEC 60063. E12 has twelve values per decade (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82), E24 has twenty-four, so E24 lets you land closer to the target current. A white LED on 5 V at 20 mA needs an ideal 90 Ω; E12 offers 100 Ω (18 mA, −10%) and E24 offers 91 Ω (19.8 mA, −1.1%).

For the power rating, aim for at least twice the actual dissipation P = V × I. A resistor running at its full rating gets hot, and the allowable power drops further inside a closed enclosure. Indicator LEDs dissipate tens of milliwatts, so 1/8 W or 1/4 W parts are fine. A 350 mA 1 W LED driven through a resistor from 12 V is a different story: the resistor burns about 3 W, more than twice what the LED itself uses. Twice that is 6.16 W, too much for a 5 W part, so the calculator recommends 10 W, and it shows a warning when even 10 W, the largest rating it offers, is less than twice the dissipation. That job belongs to a constant-current driver.

Parallel strings need their own resistors

Sharing one resistor between several LEDs in parallel sends most of the current through the LED with the lowest Vf. As it warms, its Vf falls further and it takes even more current. The calculator's parallel-string setting assumes each string has its own resistor; the only thing that multiplies is the total supply current and power.

Worked examples

Red LED on 5 V

Input
5 V / Vf 2.0 V / 20 mA / 1 LED
Output
150 Ω (same in E12 and E24), 60 mW, 1/8 W rating

Efficiency 40%. Colour bands brown, green, brown, gold.

White LED on 5 V

Input
5 V / Vf 3.2 V / 20 mA / 1 LED
Output
Ideal 90 Ω → E12 100 Ω (18 mA), E24 91 Ω (19.8 mA)

E12 runs 10% low, E24 about 1% low.

Three white LEDs on 12 V

Input
12 V / Vf 3.2 V / 20 mA / 3 in series
Output
120 Ω, 48 mW, efficiency 80%

Adding LEDs in series cuts the power wasted in the resistor.

A 3.0 V LED on 3.3 V

Input
3.3 V / Vf 3.0 V / 20 mA / 1 LED
Output
15 Ω with a low-headroom warning

A Vf just 0.1 V higher drops the current to about 13 mA.

Four red strings on a 9 V battery

Input
9 V / Vf 2.0 V / 20 mA / 1 LED / 4 strings
Output
E24 360 Ω per string (19.4 mA), 80 mA total, 1/2 W rating

About 0.14 W per resistor. A 9 V battery will not last long at 80 mA.

A 1 W LED on 12 V

Input
12 V / Vf 3.2 V / 350 mA / 1 LED
Output
Ideal 25.1 Ω → 27 Ω (326 mA, 2.87 W), 10 W rating

The resistor dissipates more than twice the LED's 1.12 W. Use a driver.

How to use it

  1. Enter the supply voltage, then pick a preset or type Vf and current from your datasheet.
  2. Set the number of LEDs in series and the number of parallel strings.
  3. Read off the E12 and E24 resistors, the actual current and the recommended power rating.

Frequently asked questions

What if the calculated value isn't a standard resistor?

Use the next standard value up. The calculator does exactly that, so the current ends up slightly below target.

What current should I use?

Start from the datasheet test current, often 20 mA, and stay well below the absolute maximum (30 mA for the part cited here). For indicators, 5 to 10 mA is often bright enough.

Does the resistor go before or after the LED?

Either. In a series circuit the same current flows through both.

Can several LEDs share one resistor in parallel?

Not reliably. The LED with the lowest Vf takes most of the current. Give each string its own resistor.

Sources

Last reviewed:

Privacy and how data is handled