Skip to the calculator
Rule Calculator

LED Resistor Calculator

With supply voltage 5 V, leds in series 1, forward current 20 mA, led resistor comes to 160 ohm — series resistor. It is reached in 6 steps, the last of which is 3.2 / 0.02, and each one is printed on the page with its numbers filled in. The formula is the one published by Typical LED forward voltages by material system, not an approximation fitted to it.

The series resistor an LED needs, from supply voltage, forward voltage and current — with the power it must dissipate and which standard value to pick.

Formula and sources checked · How we check

Supply voltage 5 V, LED colour Red — 1.8 V forward, LEDs in series 1, Forward current 20 mA

160 ohm

Series resistor for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.

It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.

Series resistor
160 ohm
Forward voltage per LED
1 * 1.8 + 0 * 2.1 + 0 * 2.2 + 0 * 3.2 + 0 * 3.2 + 0 * 21.8 V
Dropped by the LEDs
1.8 * 11.8 V
Left for the resistor
5 - 1.83.2 V
Resistor needed
3.2 / 0.02160 ohm
Power the resistor dissipates
3.2 * 0.020.064 W
Power in the LEDs
1.8 * 0.020.036 W

Ask about this in the chat

Worked example

A red LED on 5 V at 20 mA needs 160 ohms, and the nearest standard E12 value above it is 180 ohms — always round up, because rounding down raises the current past the rating. The resistor dissipates 64 mW, so an ordinary quarter-watt part is fine.

How to work it out yourself

  1. 1.Use the datasheet forward voltage where you have one. The colour presets are typical values, and real parts vary by a few tenths of a volt between batches of the same colour.
  2. 2.Round the resistor up to the next standard value, never down. Rounding down increases the current, and LED brightness barely changes while lifetime falls sharply.
  3. 3.Check the power line. Under 125 mW a quarter-watt resistor is fine; above that step up, because a resistor at its rated power runs at well over 100 °C.
  4. 4.For LEDs in series, the supply has to exceed the sum of their forward voltages with volts left over — three white LEDs need more than 9.6 V before any resistor is possible at all.
  5. 5.Never wire LEDs in parallel on one resistor. Forward voltages differ slightly, the lowest one takes most of the current, and it fails first — then the next.

Resistor for a red LED at 20 mA

05551.1K3 Supply voltage: 60 ohm3.3 Supply voltage: 75 ohm5 Supply voltage: 160 ohm6 Supply voltage: 210 ohm9 Supply voltage: 360 ohm12 Supply voltage: 510 ohm15 Supply voltage: 660 ohm18 Supply voltage: 810 ohm24 Supply voltage: 1.1K ohm324Supply voltage (V)
Resistor for a red LED at 20 mA
Supply voltage (V)Series resistorPower the resistor dissipates
360 ohm0.02 W
3.375 ohm0.03 W
5160 ohm0.06 W
6210 ohm0.08 W
9360 ohm0.14 W
12510 ohm0.2 W
15660 ohm0.26 W
18810 ohm0.32 W
241,110 ohm0.44 W

At 3 V the resistor is only 60 ohms and dissipates 24 mW; at 24 V it is 1,110 ohms and dissipates 444 mW, which needs a half-watt part rather than the usual quarter-watt. Driving one small LED from a high supply wastes most of the energy as heat in the resistor.

The formula

  1. Forward voltage per LED1 * 1.8 + 0 * 2.1 + 0 * 2.2 + 0 * 3.2 + 0 * 3.2 + 0 * 2
  2. Dropped by the LEDs1.8 * 1
  3. Left for the resistor5 - 1.8
  4. Resistor needed3.2 / 0.02
  5. Power the resistor dissipates3.2 * 0.02
  6. Power in the LEDs1.8 * 0.02

Source: Typical LED forward voltages by material system — Nichia and Cree datasheet ranges, IEC 60063 — E12 and E24 preferred resistor values, NIST SP 811 — units of voltage, current and power

Questions people actually ask

What resistor do I need for an LED?
R = (supply − forward voltage) ÷ current. A red LED on 5 V at 20 mA is (5 − 1.8) ÷ 0.02 = 160 ohms, so use the next standard value up, 180 ohms.
What is the forward voltage of an LED?
It depends on the colour, because colour follows the semiconductor bandgap. Red is around 1.8 V, yellow 2.1, green 2.2, and blue and white about 3.2. That is why a blue LED will not light at all from a 3 V coin cell that runs a red one happily.
Can I run an LED without a resistor?
Only from a constant-current driver. An LED's current rises very steeply with voltage past its forward drop, so a small supply variation becomes a large current change and the part destroys itself. Some LED assemblies have the resistor built in — those say so.
Can I put several LEDs on one resistor?
In series, yes — the same current flows through all of them. In parallel, no: their forward voltages differ slightly, the lowest takes a disproportionate share of the current and burns out, and the survivors then inherit its share. Give each parallel branch its own resistor.
What happens if the resistor is too big?
Less current, so a dimmer LED — harmless. Too small is the dangerous direction: the current goes over the rating and the LED dims permanently over weeks or fails outright. When in doubt use the larger value.
Why is my LED dim on 3.3 V?
A white or blue LED needs about 3.2 V just to conduct, leaving 0.1 V for the resistor — not enough to set a useful current. Those parts need 5 V or a boost driver; a red or yellow LED works fine on 3.3 V.

Related

Put this calculator on your site

Free, no attribution required beyond the link.

<iframe src="https://rulecalculators.com/embed/led-resistor" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="LED Resistor Calculator"></iframe>
Did this answer your question?