Skip to content
RFrftools.io
Power ElectronicsMarch 9, 20265 min read

How to Size an LED Current Limiting Resistor

Calculate the correct LED current limiting resistor for any supply voltage and LED color. Includes worked examples, E24 selection, and power dissipation.

Contents

The One Resistor You Can't Afford to Skip

Every engineer has done it at least once: connected an LED directly to a supply rail and watched it flash brilliantly — for about half a second — before going dark forever. LEDs are current-driven devices with an exponential V-I characteristic, which means even a small overvoltage drives a destructive amount of current through the junction. A series current limiting resistor is the simplest, cheapest, and most reliable way to set the operating point.

This sounds trivial, and the math is simple. But in practice, choosing the right value means thinking about standard resistor series, actual current deviation, and power dissipation in the resistor itself — especially when you're placing dozens of LEDs on a panel indicator board or driving high-brightness LEDs from a 24 V industrial supply. I've seen plenty of boards come back from assembly with charred 0603s because someone copied a 5 V circuit into a 24 V design without rechecking the power budget.

The Fundamental Equation

The resistor drops the difference between the supply voltage VSV_S and the LED forward voltage VFV_F, and sets the current IFI_F:

R=VSVFIFR = \frac{V_S - V_F}{I_F}

That's it. But the nuance is in the details, and those details matter more than you'd think:

VFV_F varies with LED color and manufacturer. A red LED typically drops 1.8–2.0 V, while a white or blue LED drops 3.0–3.4 V. Always check the datasheet, but those ranges cover the vast majority of through-hole and SMD indicator LEDs. I usually add a 0.2 V margin when I'm not sure of the exact part yet — better to underestimate slightly and end up with a dimmer LED than to overestimate and blow it during the first power-up test. IFI_F depends on your application. 20 mA is the classic "standard brightness" value for 5 mm through-hole LEDs, but modern high-efficiency LEDs are perfectly visible at 1–5 mA. This matters when you're running on battery or have 50 status LEDs sharing a microcontroller's total I/O budget. I've had designs where dropping from 20 mA to 2 mA per LED saved enough current to extend battery life by 30%. You'd be surprised how bright a good modern LED is at just a couple milliamps. The exact resistance almost never lands on a standard value. You'll need to pick the nearest value from the E24 series (or E96 if you're using 1% resistors), and that shifts the actual operating current. Most engineers skip this step and just use whatever the formula spits out, then wonder why their LED is slightly brighter or dimmer than expected. The E24 series has about 10% spacing between values, so you're almost guaranteed to be off by a few percent.

Worked Example: White LED on a 5 V Supply

Let's say you're driving a white indicator LED from a 5 V USB supply at a standard 20 mA. The datasheet lists VF=3.2VV_F = 3.2\,\text{V} typical.

Step 1 — Calculate the exact resistance:
R=5.03.20.020=1.80.020=90ΩR = \frac{5.0 - 3.2}{0.020} = \frac{1.8}{0.020} = 90\,\Omega
Step 2 — Select the nearest E24 value.

90 Ω isn't in the E24 series. The nearest standard values are 82 Ω and 91 Ω. You almost always round up to limit current, so pick RE24=91ΩR_{E24} = 91\,\Omega. Rounding up protects the LED — you'll get slightly less current, which is fine. Rounding down means you're pushing more current through the junction, and if your supply voltage is a bit high or the LED's VFV_F is on the low end of the tolerance band, you could be exceeding the absolute maximum rating.

Step 3 — Calculate the actual current with the E24 resistor:
Iactual=VSVFRE24=1.89119.8mAI_{actual} = \frac{V_S - V_F}{R_{E24}} = \frac{1.8}{91} \approx 19.8\,\text{mA}

That's within 1% of the target — perfectly acceptable. The LED won't know the difference.

Step 4 — Check power dissipation in the resistor:

With the exact resistance:

PR=IF2×R=(0.020)2×90=36mWP_R = I_F^2 \times R = (0.020)^2 \times 90 = 36\,\text{mW}

With the E24 value:

PR,E24=(0.0198)2×9135.6mWP_{R,E24} = (0.0198)^2 \times 91 \approx 35.6\,\text{mW}

A standard 0603 SMD resistor rated for 100 mW handles this easily. No concerns here. You've got almost 3× margin, which is plenty even if the board gets warm or you're operating at elevated ambient temperatures.

When Power Dissipation Actually Matters

Now change the scenario: you're driving the same white LED from a 24 V industrial supply at 20 mA. This is where things get interesting.

R=24.03.20.020=20.80.020=1040ΩR = \frac{24.0 - 3.2}{0.020} = \frac{20.8}{0.020} = 1040\,\Omega

Nearest E24: 1kΩ1\,\text{k}\Omega or 1.1kΩ1.1\,\text{k}\Omega. Let's pick 1kΩ1\,\text{k}\Omega (rounding down slightly — acceptable if the LED's absolute max is well above 20 mA, which it usually is for standard indicator LEDs).

Iactual=20.81000=20.8mAI_{actual} = \frac{20.8}{1000} = 20.8\,\text{mA}

Now the power in the resistor:

PR=(0.0208)2×1000433mWP_R = (0.0208)^2 \times 1000 \approx 433\,\text{mW}

That's nearly half a watt — far too much for an 0603 (100 mW) or even an 0805 (125 mW). You'd need at least a 2512 package rated for 1 W, or a through-hole resistor. And here's the kicker: a standard ¼ W through-hole resistor won't cut it either. A ½ W resistor is the safe choice, and you'll want to give it some breathing room on the board because it's going to get warm.

This is exactly the kind of detail that's easy to overlook when you're copying a "standard" LED circuit from a 5 V design into a 24 V system. I've seen production boards where someone placed 50 indicator LEDs with 0603 resistors on a 24 V rail, and every single one of them burned out during the first extended run test. The resistors literally turned black.

The takeaway: most of the supply-to-LED voltage difference is being burned as heat in the resistor. At higher supply voltages, you're wasting a ton of power, and at some point it makes more sense to use a constant-current driver IC or a switching LED driver instead. If you're driving dozens of LEDs from 24 V, a proper LED driver will save you board space, reduce heat, and probably cost less overall than buying 50 beefy resistors and dealing with thermal management.

Quick Reference: Common Combinations

SupplyLED Color (VFV_F)Target IFI_FExact RRE24 RRPRP_R (E24)
3.3 VRed (2.0 V)20 mA65 Ω68 Ω25 mW
5 VYellow (2.1 V)20 mA145 Ω150 Ω56 mW
5 VBlue (3.2 V)10 mA180 Ω180 Ω18 mW
12 VRed (2.0 V)20 mA500 Ω510 Ω196 mW
24 VIR (1.3 V)50 mA454 Ω470 Ω1.09 W
Notice that last row — over a watt in the resistor for a single IR LED on a 24 V rail. That's a 2 W resistor minimum, and you'll want to think about thermal management on your PCB. If you've got a dense board, that much heat in a small area can cause problems. I've had boards where the thermal camera showed hot spots around the LED resistors that were 20°C above ambient. Not enough to fail immediately, but enough to make me nervous about long-term reliability.

Practical Tips

Always round resistance up unless you've confirmed the LED can tolerate the higher current with margin. Rounding down by one E24 step typically increases current by 5–10%, which doesn't sound like much until you realize that's the difference between running at 20 mA (safe) and 22 mA (potentially exceeding the absolute maximum rating on some parts). Use the LED datasheet VFV_F at your operating current, not the maximum rating. Forward voltage varies with current, and the typical value at 20 mA is what you want. If you look at a typical LED datasheet, you'll see the V-I curve — VFV_F can shift by 0.2–0.3 V between 1 mA and 30 mA. Using the wrong value throws off your entire calculation. For battery-powered designs, consider running indicator LEDs at 1–2 mA. Modern high-efficiency LEDs are clearly visible at these levels, and you save significant standby power. I worked on a handheld device where we had eight status LEDs, and dropping them from 10 mA to 2 mA each saved 64 mA total — that's a huge chunk of the overall power budget when your battery capacity is only 2000 mAh. When VSVFV_S - V_F is small (e.g., 3.3 V supply with a blue LED at 3.2 V), the resistor value becomes very small and current becomes extremely sensitive to VFV_F tolerance. A blue LED might have VFV_F anywhere from 3.0 V to 3.4 V depending on the bin and temperature. If you design for 3.2 V typical and you get a 3.0 V part, your current could jump by 50% or more. In these cases, a constant-current source is a better choice. It's more expensive, sure, but it's worth it when you need predictable brightness across production lots.

Another thing to watch out for: supply voltage tolerance. If you're designing for 5 V but your actual supply can be anywhere from 4.75 V to 5.25 V, that 10% variation propagates directly into your LED current. For critical applications (like optical communication or precise color matching), you need tighter control than a simple resistor can provide.

Try It

Don't do this math by hand every time — open the LED Current Limiting Resistor Calculator and plug in your supply voltage, LED color, and desired current. The tool instantly gives you the exact resistance, the nearest E24 standard value, the actual operating current, and power dissipation for both — so you can pick the right resistor and the right package on the first try. I keep this calculator bookmarked and use it constantly, even for designs I've done a hundred times before. It's faster than doing the math myself, and it catches mistakes before they make it to the board.

Related Articles