Skip to content
EN
  • Español
  • English
Advertisement

LED resistor calculator (and Zener diode)

Calculate the resistor for one or more LEDs in series: value, power rating and standard E12 or E24 resistor with its real current. Also for a Zener diode.

Fill in 2 of the 3 fields and the missing one is calculated. You can type in any of them.

Filled in from the color (typical value). The exact one is in the manufacturer's datasheet.
5 mm LED: 10 to 20 mA. Zener: 10% to 20% of its maximum current.
Power in the resistor—
Recommended resistor power rating (twice or more)—
Standard E12 resistor (next value up)—
Real current with the E12—
Standard E24 resistor (next value up)—
Real current with the E24—
Power of each LED—
Zener power with no load (worst case)—
Energy reaching the LEDs—

Use this calculator for reference only, as we cannot guarantee that the results are free of errors.

Disclaimer

https://dyaii.es/en/led-resistor-calculator/

Advertisement

An LED cannot be connected straight to a battery or a power supply: it needs a series resistor to limit its current. This calculator gives you that resistor for one or several LEDs in series, the power it will dissipate, the standard resistor (E12 and E24 series) you have to buy and the real current it will give. It also works the other way around: what current a resistor you already have gives, or what voltage you need. And it works for the resistor of a Zener diode regulator.

How to use the calculator

  1. Choose LED or Zener.
  2. For an LED, choose the color: its typical forward voltage is filled in. If the manufacturer's datasheet gives another one, type it in. Enter how many LEDs go in series.
  3. For a Zener, enter its voltage and the load current it will supply.
  4. Of these three values, enter two: supply voltage, current and resistance. The one you leave empty is calculated, in the unit you choose (mA, kΩ…).
  5. Below you get the resistor power, the recommended power rating and the standard resistors with their real current. In the drawing, the LEDs shine more or less according to the current and the resistor turns red if a 1/4 W one would overheat.

LED resistor formula

R = (Us − n · UF) / I

Where Us is the supply voltage, UF the forward voltage of each LED, n the number of LEDs in series and I the current you want (in amperes: 20 mA = 0.02 A). The resistor takes the excess voltage. Solving for the others:

I = (Us − n · UF) / R · · · Us = n · UF + R · I

The power the resistor dissipates is the voltage across it times the current:

P = (Us − n · UF) · I

Choose a resistor rated for at least twice that power (1/8 W, 1/4 W, 1/2 W, 1 W, 2 W…): that way it runs warm, not hot, and lasts longer. The calculator recommends the first standard rating that meets the power of the exact resistor; with the standard resistor, which is slightly larger, the power drops a little.

Advertisement

LED voltage by color

The forward voltage depends on the material of the LED, which is what gives its color. These are typical values at about 20 mA for a 5 mm LED; each manufacturer gives its own in the datasheet.

ColorTypical forward voltage
Infrared1.2 V
Red2.0 V
Orange, yellow and standard green2.1 V
High-brightness green, blue and white3.2 V
Ultraviolet3.4 V

Ordinary 5 mm LEDs handle about 20 mA (high-brightness ones, sometimes 30 mA). At 10 mA they already shine well and last longer. Power LEDs (1 W, 3 W) need a constant-current driver, not a resistor.

Standard resistors: E12 and E24 series

The calculated value almost never exists: resistors are made in the standard values of the E series (IEC 60063). You pick the standard value right above, so that the current ends up slightly below the one you want rather than above it.

  • E12 (±10%): 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82, and their multiples of 10.
  • E24 (±5%): the above plus 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75 and 91.

To read the colors of the resistor, use the resistor color code calculator (in the related calculators, at the end of the page).

Worked example

A red LED (2 V) at 20 mA with a 12 V power supply:

R = (12 − 2) / 0.02 = 500 Ω · · · P = 10 · 0.02 = 0.2 W

The next standard value up is 560 Ω in E12 (green, blue, brown and silver or gold), which gives I = 10 / 560 ≈ 17.9 mA, or 510 Ω in E24 (≈ 19.6 mA). Since it dissipates 0.2 W, the recommended rating is 1/2 W. Three white LEDs in series (3 · 3.2 = 9.6 V) on the same supply need only R = (12 − 9.6) / 0.02 = 120 Ω and 0.048 W: in series the energy is used much better.

Resistor for a Zener diode

A reverse-connected Zener diode holds its voltage Uz almost constant: with a series resistor it makes a simple regulator for small voltages. The resistor has to supply the Zener current (Iz) and the load current (IL) at the same time:

R = (Us − Uz) / (Iz + IL) · · · Pz with no load = Uz · (Iz + IL)

Choose an Iz of 10% to 20% of the Zener's maximum current (for a 0.5 W, 5.1 V one, about 10 mA). If the load is disconnected, all the current flows through the Zener: check that it can handle that power. If the load draws a lot of current or the supply varies a lot, a voltage regulator is better.

Always connect the LED the right way round: the long lead (anode) to the positive. The wrong way round it does not light and, above about 5 V, it can be damaged.
Advertisement

Frequently asked questions

Why does an LED need a resistor?

Because an LED does not limit its own current: above its forward voltage, a few tenths of a volt more make the current shoot up and burn it out. The resistor takes the excess voltage and sets the current: I = (Us − UF) / R.

What resistor do I use for an LED on 5 V or 12 V?

For a red LED (2 V) at 20 mA: on 5 V, R = (5 − 2) / 0.02 = 150 Ω; on 12 V, R = (12 − 2) / 0.02 = 500 Ω, which in the E12 series is 560 Ω (about 17.9 mA). For a white or blue one (3.2 V) on 5 V you get 90 Ω: use 100 Ω.

Can I run several LEDs with a single resistor?

In series, yes: the voltages add up (n · UF) and must stay below the supply with some margin. In parallel with a single resistor, no: the LED with the lowest voltage takes more current and ends up burning out. Use one resistor for each branch.

What wattage should the resistor be?

At least twice the power it dissipates: P = (Us − n · UF) · I. On 12 V, a red LED at 20 mA dissipates 0.2 W, so a 1/2 W resistor is better than the usual 1/4 W one, which would run very hot.

How do you calculate the resistor for a Zener?

The resistor has to supply the Zener current plus the load current: R = (Us − Uz) / (Iz + IL). With no load, all the current goes through the Zener, so check that it can handle Uz · (Iz + IL).

Related calculators

Share

WhatsApp X LinkedIn Telegram Email
Advertisement

Install Diseño y automatización de instalaciones industriales on your phone

All the calculators one tap away, full screen, like an app. It takes no space and is always up to date.