Setting an LED's current-limiting resistor with variation included

Everyone knows R = (Vcc − Vf) / I. The catch is that Vf varies by close to 0.5V between parts of the same type, and both the supply and the resistor carry their own tolerance. Skip checking how far the current moves in the worst combination and you end up with either a dim LED or a burnt resistor.

Last updated: 2026-09-14 LEDResistorsWorst-case designDerating

Vf is a "typical" figure, and it varies between parts

The forward voltage Vf on an LED datasheet is a typical value. Even within one part number it spans roughly 1.8–2.2V for red and roughly 2.8–3.4V for white or blue, and the datasheet gives minimum and maximum figures, or bins, to go with it.

Vf also shifts with current. The datasheet's Vf is measured at a rated current (20mA, say), so an indicator circuit running only 2mA will see a Vf about 0.2–0.3V lower. Vf also drops as temperature rises, at roughly −2mV/°C, so a jump from 25°C to 75°C ambient takes about 0.1V off it.

So the Vf to design with is not the typical figure at all — it is the minimum Vf for the condition that maximizes current, and the maximum Vf for the condition that minimizes it.

How far current moves under worst-case conditions

Take a white LED (Vf typical 3.0V, range 2.8–3.4V) driven at 10mA from a 5V supply. Using the typical value, R = (5 − 3.0) / 0.01 = 200Ω.

With ±5% on the supply and ±1% on the resistor, current peaks at "high supply, low Vf, low resistance": (5.25 − 2.8) / 198 = 12.4mA. It bottoms out at "low supply, high Vf, high resistance": (4.75 − 3.4) / 202 = 6.7mA. Against a design target of 10mA, the actual range is 6.7–12.4mA — roughly a factor of two.

Try to drive the same LED from 3.3V and the picture changes. The typical-value resistor is R = (3.3 − 3.0) / 0.01 = 30Ω, but the maximum works out to (3.4 − 2.8) / 29.7 = 20mA, and the minimum, (3.2 − 3.4) / 30.3, gives no current at all. There is only 0.3V of headroom across the resistor, and ±0.3V of Vf variation sits right on top of it.

As a rule, if the headroom is at least three times the Vf variation, the current stays within about a factor of two. For a white LED on a 3.3V rail, give up on setting current with a plain resistor and either use a constant-current driver or take the supply from 5V.

Current spread for a 5V / white LED (Vf 2.8–3.4V) / R=200Ω±1% / supply ±5%
CaseSupplyVfResistorCurrent
Design5.00V3.0V200Ω10.0mA
Max5.25V2.8V198Ω12.4mA
Min4.75V3.4V202Ω6.7mA

For an indicator LED, a factor-of-two spread is not a problem — the eye perceives brightness logarithmically, so doubling the current only reads as "a bit brighter." It matters when several LEDs need matched brightness, or when the design already runs close to the rated current.

LED current spread versus supply voltageHorizontal bars showing that a white LED (Vf 2.8–3.4V) designed for 10mA lands at 6.7–12.4mA from a 5V supply, but at 0–20mA from 3.3V. How far LED current moves under worst-case conditions White LED (Vf 2.8–3.4V), 10mA design target, supply ±5% (±3% for 3.3V), resistor ±1% 0mA 5mA 10mA 15mA 20mA Design target 10mA 5V supply, R = 200Ω 2.0V headroom. Spread about 2x 6.7mA 12.4mA 3.3V supply, R = 30Ω 0.3V headroom: not workable 0mA 20mA ← stays off With headroom (Vcc - Vf) at 3x the Vf spread or more, current stays within about 2x. For a resistor-driven white LED on 3.3V, consider constant-current drive or a different supply.
Figure 1: the same white LED designed for 10mA stays within 6.7–12.4mA from a 5V rail, but swings from zero to 20mA from 3.3V.

Size the resistor's power rating from the maximum current

Resistor dissipation is I²R. At the design value of 10mA that is 0.01² × 200 = 20mW, but at the maximum current of 12.4mA it becomes 0.0124² × 198 = 30mW. The power rating has to be chosen against that maximum, not the design value.

Typical chip-resistor ratings are 1/16W (62.5mW) for a 1005 (0402), 1/10W for a 1608 (0603), 1/8W for a 2012 (0805), and 1/4W for a 3216 (1206). Those ratings hold only up to 70°C ambient; above that they are derated, reaching zero at 125°C.

As a rule of thumb, stay at or below 50% of the rating. For 30mW that means a rating of at least 60mW — a 1005 only just makes it, while a 1608 has margin. Go up a size further if the resistor sits at a board edge, somewhere with poor heat dissipation, or near another heat-generating part.

A resistor run close to its rating will not fail outright. Its value creeps up slowly, the LED dims, and it eventually opens after some years. That is one of the causes behind an LED that "just got dimmer."

Do not let several LEDs share one resistor

It's tempting to put two LEDs in parallel and drive them from a single resistor. Doing so pushes current toward whichever LED has the lower Vf. Put LEDs with Vf of 2.9V and 3.1V in parallel and that 0.2V difference — on an LED's steep forward curve — corresponds to several times the current, so one LED lights up brightly and the other barely lights at all.

As temperature rises, that same LED's Vf drops further and pulls in even more current — a thermal-runaway direction. The rule for parallel LEDs is one resistor per LED.

Series is fine. Add up the Vf values and size the resistor from (Vcc − ΣVf) / I. Four red LEDs (Vf 2.0V) in series from a 12V supply leave 12 − 8 = 4V of headroom, plenty of margin against variation. But once the sum of the maximum Vf values approaches the supply voltage, the same problem as the 3.3V example shows up. As a rule of thumb, keep the sum of maximum Vf values at or below 70–80% of the supply.

  • Driving straight from a microcontroller GPIO. A GPIO output has its own series resistance (tens of ohms), which pulls its output below the supply rail. Recalculate using the VOH specification (e.g. 2.4V on a 3.3V part), and watch the total current limit across the port.
  • PWM dimming. Size the resistor from the peak current, but rate it for the average power. At 10% duty, the resistor's average power drops to 1/10, but the instantaneous current is unchanged.
  • Reverse voltage. An LED's reverse breakdown is typically only around 5V. In circuits that could see AC or reversed polarity, add an anti-parallel diode.

What the calculator handles

Our LED drive circuit calculator implements exactly this article's math. Enter the supply voltage's max and min, Vf's max and min, and the resistor tolerance, and it returns the maximum and minimum current, the resistor's worst-case dissipation, and the rating it needs.

Size the resistor from typical values first, then switch on the detailed settings to add variation and check whether the resulting current spread is acceptable. Once the spread exceeds a factor of two, it's time to raise the supply voltage or consider constant-current drive.

Frequently asked questions

Which E24 value should I pick for the resistor?
Pick the closest standard value in the direction that keeps current from exceeding the design target — that is, round up in resistance. For a calculated 200Ω, use 200Ω (it exists in E24) or 220Ω; in E12, use 220Ω. Rounding a 10mA design up to 220Ω gives 9.1mA, a difference in brightness you won't be able to see.
How do I drive a white LED from 3.3V?
Resistor-driving a white, blue, or green (InGaN-family) LED with Vf around 3.0V from 3.3V lets variation swing the current from 0 to 20mA, which is not a workable design. Use a constant-current driver IC, drive from 5V with a resistor instead, or switch to a red, yellow, or yellow-green LED (AlInGaP family, Vf around 2V).
Should the resistor go on the LED's anode side or cathode side?
Electrically it makes no difference. In practice, let routing decide: cathode side when sinking through a GPIO, anode side when several LEDs need a shared cathode ground.
Do I need to account for the resistor's temperature coefficient?
For an ordinary chip resistor (±100–200ppm/°C), a 50°C rise changes the value by only 0.5–1%, negligible next to Vf variation. It matters for current-sense shunt resistors or precision constant-current circuits.

Standards and references

  • Individual LED manufacturer datasheets — Minimum, typical, and maximum Vf, bin grades, current-Vf curves, and temperature coefficients
  • IEC 60115-8 — Power rating and derating curves for fixed surface-mount chip resistors
  • JEITA RCR-2121 — Derating guidelines for semiconductor devices

← All columns