Red LED on 5 V
The default indicator LED on a 5 V logic board.
R = 150 Ω exactly — an E24 value with no compromise
Size the current-limiting resistor for any LED. Rounds up to the nearest E24 value, because rounding down overdrives the LED.
The rail driving the LED. Accepts 3v3, 5, 12.
Typical indicator-LED values. Always prefer the datasheet figure.
Voltage dropped across one LED at the operating current.
Accepts 20m for 20 mA. Indicator LEDs are typically 5–20 mA.
Series LEDs share one resistor. Never parallel them on a single resistor.
Resistor dissipates 60.0 mW — a 0.125 W part gives the usual 2× margin.
The default indicator LED on a 5 V logic board.
R = 150 Ω exactly — an E24 value with no compromise
Blue and white LEDs drop over 3 V, leaving very little headroom on a 3.3 V rail.
Only 0.1 V across the resistor — this design is marginal
Stacking LEDs in series is how you stop wasting most of the supply in the resistor.
9.6 V into the LEDs, only 2.4 V wasted — 80% efficient
High supply, one small LED. Watch what happens to the resistor dissipation and efficiency.
R = 1.1 kΩ dissipating 440 mW — and only 8% of the power reaches the LED
When to use this: any time an LED is connected to a voltage source. Panel indicators, status lights on a board, backlights, illuminated switches — all of them need a resistor, and this is how you pick it.
An LED is not a resistor. Its current rises exponentially with the voltage across it, so a tenth of a volt too much can double the current. Connect one directly across a supply and the only thing limiting the current is the LED’s own bulk resistance and whatever the supply can deliver — usually enough to destroy the part before you let go of the switch.
The series resistor solves this by taking up the difference between the supply and the LED’s forward voltage, and setting the current by Ohm’s law:
R = (Vsupply − Vf) / If
A red LED drops about 2 V and is happy at 20 mA. From a 5 V supply the resistor has to absorb 3 V, so R = 3 / 0.02 = 150 Ω. That happens to be an exact E24 value, which is why it turns up in every beginner tutorial.
This is the detail most calculators get wrong. When the ideal value is not a standard one, you round up to the next E24 value, never to the nearest.
Take a 12 V supply and a 2 V LED at 20 mA: R = 500 Ω. The E24 neighbours are 470 Ω and 510 Ω. Rounding to nearest picks 470 Ω, which gives 21.3 mA — above the target. Rounding up picks 510 Ω, giving 19.6 mA, comfortably under.
The 6% difference sounds trivial, and for one LED at room temperature it usually is. It stops being trivial when the supply is at the top of its tolerance, the LED is a low-Vf sample, and the part is in a warm enclosure. All three stack in the same direction, and the resistor is the only thing standing between the LED and its absolute maximum rating.
| Colour | Typical Vf | Chemistry | Notes |
|---|---|---|---|
| Infrared | 1.2 – 1.6 V | GaAs | Remote controls, optocouplers |
| Red | 1.8 – 2.2 V | AlGaAs | The classic indicator |
| Amber / Yellow | 2.0 – 2.2 V | AlGaInP | Similar to red |
| Green | 2.0 – 3.4 V | GaP or InGaN | Old green is 2.2 V, modern pure green is over 3 V |
| Blue | 3.0 – 3.4 V | InGaN | Little headroom on a 3.3 V rail |
| White | 3.0 – 3.4 V | Blue + phosphor | Electrically a blue LED |
These are starting points, not specifications. Vf varies between manufacturing batches of the same part number, and it rises with current — a datasheet quoting 3.2 V at 20 mA might show 2.9 V at 5 mA. Use the datasheet figure at your operating current.
The resistor does not just set the current; it burns the excess voltage as heat. On a 5 V supply driving a 2 V LED, 60% of the power goes into the resistor. On a 24 V industrial rail driving the same LED, 92% is wasted.
| Supply | LEDs in series | Power to LEDs | Wasted in resistor |
|---|---|---|---|
| 5 V | 1 red (2 V) | 40% | 60% |
| 5 V | 2 red (4 V) | 80% | 20% |
| 12 V | 1 white (3.2 V) | 27% | 73% |
| 12 V | 3 white (9.6 V) | 80% | 20% |
For a single indicator LED drawing 20 mA, wasting 60% of 100 mW is irrelevant. For anything with real light output — a lamp, a backlight, a strip — it matters enormously, and the two fixes are stacking LEDs in series or using a constant-current driver that switches rather than dissipates.
Series works. LEDs in series carry identical current by definition, so one resistor sets the current for the whole string. The only constraint is that the supply must exceed the sum of the forward voltages with enough headroom left for the resistor to do its job — aim for at least 15–20% of the supply across the resistor, or current regulation gets poor.
Parallel does not. Two LEDs across one resistor look symmetric but are not. Whichever has the lower forward voltage takes more current, heats up, drops further in voltage, and takes more still. The result is one bright LED, one dim one, and an early failure. Give each parallel branch its own resistor.
A green LED (Vf ≈ 2.1 V) driven directly from a GPIO pin at 5 mA — low enough that the pin’s drive limit is not a concern:
R = (3.3 − 2.1) / 0.005 = 240 ΩDissipation = 1.2 × 0.005 = 6 mW
240 Ω is an E24 value. At 5 mA a modern green LED is still clearly visible indoors, and the GPIO pin is nowhere near its 20 mA limit.
Total Vf = 3 × 3.2 = 9.6 VR = (12 − 9.6) / 0.02 = 120 ΩDissipation = 2.4 × 0.02 = 48 mW
80% of the power reaches the LEDs. But note the fragility: if the supply sags to 11 V, the resistor only has 1.4 V across it and the current drops to 12 mA — a 40% reduction in brightness from an 8% supply change. Series strings with little headroom are very sensitive to supply variation, which is the argument for a constant-current driver.
The rail the LED and resistor will be connected across.
Pick a colour for a typical value, or enter the figure from your datasheet. Vf varies between parts of the same colour, so the datasheet always wins.
Standard indicator LEDs run at 20 mA, but modern high-brightness parts are often uncomfortably bright at that. 5–10 mA is frequently plenty.
Fit the E24 value shown, not the ideal one. It is the next value up, so the actual current stays below your target rather than above it.
R = (supply voltage − LED forward voltage) / forward current. A red LED with a 2 V drop running at 20 mA from a 5 V supply needs (5 − 2) / 0.02 = 150 Ω. Always round the result up to the next standard value.
A larger resistor means less current, which is the safe direction. Rounding down pushes the current above the figure you designed for, which shortens LED life or destroys the part. The difference between rounding to nearest and rounding up is small in ohms and large in consequences.
An LED is not ohmic — its current rises exponentially with voltage. Connected directly across a supply, the current is limited only by the LED’s own bulk resistance and the supply’s ability to deliver, which is usually enough to destroy it in milliseconds. The resistor is what sets the operating point.
In series, yes — they carry the same current, so one resistor controls all of them. In parallel, no. Small differences in forward voltage mean one LED takes most of the current, runs hot, drops further in voltage, and takes even more. Each parallel branch needs its own resistor.
Use the datasheet value at your intended current, because Vf rises with current. As rough guidance: infrared 1.4 V, red 2.0 V, amber 2.1 V, green 2.2 V, blue and white 3.2 V. Individual parts vary by several tenths of a volt, which matters most when the headroom is small.
Traditional indicator LEDs are specified at 20 mA, and that is where the brightness figures in older datasheets are quoted. Modern high-efficiency parts are often too bright at 20 mA for a panel indicator — 2–5 mA is frequently enough. Lower current also means a cooler resistor and longer LED life.
Electrically it makes no difference — they are in series, so the same current flows through both regardless of order. Convention puts the resistor on the supply side, but a circuit with it on the ground side behaves identically.
The resistor dissipates (Vs − Vf) × If. On a high supply voltage with a single LED, most of the supply power ends up in the resistor rather than the LED — a 24 V rail driving one 2 V LED wastes 92% of the power as heat. Put more LEDs in series, or use a constant-current driver.
Last reviewed .
Solve for voltage, current, resistance or power. Get all four values at once, plus the resistor wattage you actually need.
4-6Decode 4, 5 and 6-band resistors, or enter a value to see its bands. Tolerance range and temperature coefficient included.
R1R2Calculate output voltage, ratio, current and output impedance — with the loading effect built in, not hidden on another page.
WPower from any two of voltage, current and resistance — then energy in kWh and what it costs to run.