EN

What resistor for an LED? Value, power and the E24 series

An LED is never wired straight to a battery or a power supply: with nothing to limit it, the current runs away and the LED burns out in a fraction of a second. The cure costs a few cents — a series resistor, and this page works out its value.

You get the exact value, the nearest standard value (the one that actually exists in a shop — E12/E24 series), the power the resistor has to absorb, and the current you will really get — for a single LED, several LEDs in series, or several parallel branches.

The forward voltage VF depends on the color: roughly 1.8 to 2.2 V for red, 2.0 to 2.4 V for yellow and standard green, 3.0 to 3.4 V for blue, white and high-brightness green, 1.2 to 1.5 V for infrared. The usual current IF of a 3 or 5 mm indicator LED is 10 to 20 mA.

Supply and LED

Circuit data

5 V (Arduino, USB), 3.3 V (ESP32), 9 V (battery), 12 V (car, LED strip)…

See the typical values by color above.

10 to 20 mA for an indicator LED; stay under the datasheet maximum.

All identical, carrying the same current.

Each branch gets ITS own resistor — never one shared resistor.

Glossary: voltage, current, resistance — the three basic quantities with the water analogy

The water picture is crude and, for once, useful. Voltage is pressure. Current is flow. Resistance is a narrowing in the pipe. Ohm's law is the three of them in one line:

V = R · I   ·   R = V / I   ·   I = V / R

The LED wants a current. The resistor sets it, once you know how much voltage is left after the LED has taken its VF.

Glossary: what an LED is, forward voltage VF, forward current IF

An LED is a diode that wastes some of the forward drop as light. VF is the drop when it is on — colour and semiconductor, not a free choice. IF is the current you decide (up to the datasheet max). Brightness tracks current, until heat and the lifetime curve say otherwise.

Why an LED without a resistor burns out: the current-voltage curve of a diode

Below VF the LED is almost off. Above it, current rises exponentially. Stick a red LED (VF ≈ 2 V) straight on 5 V and the extra 3 V has nowhere to go but the wiring and the die. Current shoots up, limited only by milliohms, and the junction dies in a blink.

The series resistor is not a “nice to have”. It is the only thing standing between an exponential I–V curve and a supply that does not care.

Reading VF and max IF on an LED datasheet

  • Typical VF — usually at 20 mA for a 3 mm / 5 mm lamp.
  • Max VF — the pessimistic number for worst-case R.
  • Max IF (continuous) — 20, 30, 50 mA on indicators; hundreds of mA on power parts.
  • PD — VF × IF, plus derating with ambient.

If there is no datasheet, assume 20 mA and a VF from the colour table, then round the resistor up.

Table of forward voltages by color and technology

ColourTypical VFRangeMaterial
Infrared1.5 V1.2–1.7 VGaAs, GaAlAs
Red2.0 V1.8–2.2 VAlGaAs, GaAsP
Orange / amber2.1 V1.9–2.3 VAlGaInP
Yellow2.2 V2.0–2.4 VAlGaInP
Green (GaP)2.2 V2.0–2.5 VGaP
Blue3.2 V3.0–3.5 VInGaN / GaN
White3.3 V3.0–3.6 VInGaN + phosphor

White and blue sit a volt above red. A resistor calculated for red will over-drive a white LED on the same 5 V rail. Recalculate.

The E12 and E24 series: why resistors only exist in certain values

You do not get 137 Ω off the reel unless you are in E96. E12 (±10 %) is 12 steps per decade: 1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2. E24 (±5 %) fills the gaps (1.1, 1.3, 1.6…). This page's resistor colour code reader is how you confirm what you actually picked.

Rounding up or down: what it changes for the LED

Round up and IF falls: a bit dimmer, a bit cooler, a bit longer-lived. Round down and you sneak toward IF,max. For indicators, always up. The eye will not notice 18 mA versus 20.

Power and rating: 1/8 W, 1/4 W, 1/2 W — recognising and choosing

PR = (VCC − n · VF) · IF = IF² · R

A 20 mA indicator on 5 V is tens of milliwatts in the resistor — a ¼ W part is luxury. On 24 V, or at 50 mA, check. Derate: a ¼ W resistor in still air is happier below ~0.15 W. ⅛ W is the tiny body; ½ W is the next size up when the arithmetic says so.

LEDs in series or in parallel: both wirings, their advantages and their traps

Series — one current, one resistor, VCC must exceed the sum of VF. One open LED and the string goes dark. Parallel — each LED needs its own resistor (see below). VCC need only beat the highest VF. A shorted LED then dumps extra current into its neighbour's resistor, not into the neighbour's die, if you wired it properly.

Why never one shared resistor for several parallel LEDs

VF scatter of a few tens of millivolts is enough. The lowest VF takes more current, heats, VF falls (negative tempco), takes still more — thermal runaway, then the next die inherits the current. One resistor per LED, or a proper current source per string. A “matched” bag from the same reel is not a current source.

Driving an LED from a microcontroller: maximum pin current on Arduino/ESP32

ATmega328: 40 mA abs. max per pin, 200 mA for the chip. ESP32: 40 mA abs. max, and Espressif's notes prefer ~20 mA for a pin you leave on. For a status LED, 5–10 mA is plenty and kinder to the pad. More than one bright LED: a transistor or a MOSFET, not eight pins at 20 mA each.

Dimming: PWM rather than a variable resistor

A pot in series wastes power and, at low current, some LEDs shift colour. PWM keeps IF at the design value during the on-time and varies duty cycle. The eye averages. A few hundred hertz is enough for a panel; kHz if a camera is watching (to avoid flicker bands).

The resistor still sets the on-current. PWM is the switch, not the limiter.

Power LEDs (≥ 1 W): why a resistor no longer cuts it, current sources

350 mA through a drop of several volts is a hot resistor and a VF that walks with temperature, so IF walks too. Constant-current drivers exist because the resistor is then the wrong component. Buck LED drivers, linear current sources — not a 5 W wirewound hoping for the best.

Worked examples: red LED on 5 V, string of 3 LEDs on 12 V, white LED on a 9 V battery

  1. Red, 5 V, 20 mA, VF = 2.0 V. VR = 3 V, R = 150 Ω exact — already a standard E12/E24 value, no rounding needed: I stays at 20.0 mA, P = 60 mW. ¼ W.
  2. Three white in series on 12 V, 20 mA, 3.3 V each. Sum 9.9 V, VR = 2.1 V, R = 105 Ω → 110 Ω, I ≈ 19 mA. Tight headroom: if VF is 3.5 V each, you have only 1.5 V left and the string may look dim. Count the worst-case sum before you commit to 12 V.
  3. White on 9 V, 15 mA, VF = 3.2 V. VR = 5.8 V, R ≈ 387 Ω → 390 Ω, I ≈ 14.9 mA, P ≈ 86 mW.

Indicator current: 2 mA is often enough

Datasheet curves are shot at 20 mA because that was the 1980s standard. A modern efficient red at 2–5 mA is already a decent panel light, runs cooler, and is a lighter load on a coin cell or a GPIO. Try 2 mA before you default to 20.

Reverse voltage and putting the LED in backwards

Most 5 mm LEDs tolerate only ~5 V reverse. On 12 V a reversed LED is a dead LED. The long lead is the anode on a standard lamp — until it is not, on some bicolour parts. If it does not light, swap it before you raise IF.

Wiring drop on a long run

Twenty metres of thin bell wire is ohms. Those ohms steal from VR and dim the LED, or they sit in a parallel string and unbalance currents. Either put the resistor at the LED, or measure the voltage at the LED, not at the supply, when you set IF.

n · VF must stay well below VCC. A string whose typical VF already eats the rail will go dark on a cold day (VF rises) or when the battery sags. Leave a volt or two for the resistor, on purpose.

Related calculators