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

R = (Vcc − Vf) / I gives a nominal resistor. Supply, forward-voltage and resistance variation determine whether it also meets the required minimum and maximum current.

Last updated: 2026-10-30 LEDResistorsWorst-case designDerating

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

Datasheet Vf applies at a stated current and temperature. The calculations here assume 2.8–3.4V for a white LED; that interval is an example, not a guaranteed range for a particular part. Use the selected part's limits and temperature/current curves, and do not treat typical values as guaranteed bounds.

Design with the minimum Vf for the condition that maximizes current, and the maximum Vf for the condition that minimizes it.

Choosing a current-limiting resistor for an LED
Choosing a current-limiting resistor for an LED. AI-generated conceptual illustration; see the article’s diagrams and text for circuit details and conditions.

How far current moves under worst-case conditions

A white LED (Vf typical 3.0V, range 2.8–3.4V) at 10mA from 5V gives 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, and bottoms out at the opposite: (4.75 − 3.4) / 202 = 6.7mA. Against a 10mA target the range is 6.7–12.4mA, roughly a factor of two.

With 3.3V ±3% and 30Ω ±1%, the estimated maximum is (3.399 − 2.8) / 29.7 ≈ 20.2mA. At the other corner, 3.201V is below the assumed 3.4V Vf. The fixed-Vf model returns zero, but it cannot predict the real LED's small nonlinear current or visible brightness.

Less voltage headroom makes Vf variation more significant. For an explicit current requirement, calculate the admissible resistor interval below.

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
White-LED Vf range, supply ranges and headroomOn a voltage axis: the white-LED Vf range 2.8–3.4V, the 3.3V supply range 3.2–3.4V and the 5V supply range 4.75–5.25V. Headroom from the typical Vf of 3.0V is 0.3V at 3.3V and 2.0V at 5V. Supply minus Vf (the headroom) sets the current White LED, measured from the typical Vf of 3.0V 0V 1V 2V 3V 4V 5V White LED Vf: 2.8–3.4V 2.8V 3.4V Typical Vf 3.0V 3.3V supply (±3%) 3.2–3.4V: overlaps the Vf range Headroom 0.3V 5V supply (±5%) 4.75V 5.25V Headroom 2.0V
Figure 1: white-LED Vf against the supply. Headroom is 2.0V at 5V and 0.3V at 3.3V.

Find the nominal-resistor interval from the required current

With resistor tolerance t, allowable maximum current Imax and required minimum current Imin, nominal R must satisfy R ≥ (Vsmax − Vfmin) / [Imax(1 − t)] and R ≤ (Vsmin − Vfmax) / [Imin(1 + t)]. These inequalities use the fixed-Vf approximation and require positive voltage headroom.

For 5V ±5%, Vf = 2.8–3.4V, ±1% resistance and a required 7–12mA, the lower bound is 206.2Ω and the upper bound 191.0Ω: no overlap. Changing 200Ω to 220Ω cannot satisfy both. Relaxing the requirement to 6–12mA gives an upper bound of 222.8Ω; 220Ω then yields about 6.08–11.25mA. That is a candidate within these assumptions; brightness and temperature behaviour still need checking.

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: wide current variation 0mA 20mA ← zero in fixed-Vf model Derive the resistor interval from supply, Vf, tolerance and required current. For a resistor-driven white LED on 3.3V, consider constant-current drive or a different supply.
Figure 2: a 10mA design gives 6.7–12.4mA from 5V, but zero to 20mA from 3.3V.

Size the resistor's power rating from the maximum current

Dissipation is I²R: 0.01² × 200 = 20mW at 10mA, but 0.0124² × 198 = 30mW at the maximum 12.4mA. Rate the resistor against that maximum.

Package size alone does not determine the rating. For example, Vishay D/CRCW e3 specifies 0.063W for 0402 and 0.10W for 0603 in its standard operating mode; other modes and series differ. Check the selected resistor's derating curve, mounting conditions and working-voltage limit.

If you choose a 50% loading target for the 30mW example, the required rating is at least 60mW. That margin is a design choice here, not a universal standard requirement. Compare against the allowable power after temperature derating.

Do not let several LEDs share one resistor

Two LEDs in parallel on one resistor push current toward the one with the lower Vf. With Vf of 2.9V and 3.1V, the 0.2V difference means several times the current: one LED lights brightly, the other barely. As it warms, its Vf drops further and pulls in more current. For parallel LEDs use one resistor per LED.

Series LEDs share current: R = (Vcc − ΣVf) / I. Four red LEDs assumed at 2.0V each leave 4V nominal headroom from 12V. Check the sums of maximum and minimum Vf with supply tolerance using the same current-limit inequalities as for one LED.

  • Driving from a GPIO. Its tens of ohms of output resistance pull the output below the rail. Recalculate with the VOH spec (e.g. 2.4V on 3.3V) and check the port's total current limit.
  • PWM dimming. On-state voltage and resistance determine instantaneous current. Check the LED's pulse-current, pulse-width and duty limits, and the resistor's pulse capability as well as average power.
  • Reverse voltage. Check the selected LED's reverse-voltage rating; some parts are not intended for reverse operation. Do not assume 5V is safe. Consider protection if polarity can reverse.
Parallel LEDs: one shared resistor versus one resistor eachLeft: a Vf 2.9V LED and a Vf 3.1V LED in parallel on one resistor; current piles into the lower-Vf LED. Right: each LED has its own resistor. Shared resistor (avoid) Vcc R Vf 2.9V Vf 3.1V most of the current almost none Current piles into the lower-Vf LED: one bright, one barely lit. One resistor per LED Vcc R Vf 2.9V R Vf 3.1V Each resistor sets its own current. A Vf difference does not skew it.
Figure 3: a shared resistor lets current pile into the lower-Vf LED.

What the calculator handles

The LED drive circuit calculator implements this math. Enter the maximum and minimum of supply, Vf and resistor tolerance, and it returns the current range, the worst-case dissipation and the rating needed. If the spread exceeds a factor of two, raise the supply or consider constant-current drive.

Frequently asked questions

Which E24 value should I pick for the resistor?
After selecting a preferred value, recompute both current limits. A larger resistance reduces maximum current but can miss the minimum brightness requirement. In the example above, 220Ω satisfies 6–12mA but cannot satisfy 7–12mA.
How do I drive a white LED from 3.3V?
The 3.3V example has little headroom and a wide current spread in the fixed-Vf model. Calculate limits for the chosen LED; if no resistor interval exists, change the supply, LED or drive scheme. A constant-current driver also needs compliance headroom and is not automatically suitable at 3.3V.
Should the resistor go on the LED's anode side or cathode side?
Electrically it makes no difference. Let routing decide: cathode side when sinking through a GPIO, anode side with a shared cathode ground.
Do I need to account for the resistor's temperature coefficient?
A chip resistor (±100–200ppm/°C) changes only 0.5–1% over a 50°C rise, negligible next to Vf variation. It matters for current-sense shunts and 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
  • Vishay D/CRCW e3, document 20035 (14-Apr-2026) — Pages 1–2: standard/extended operating ratings and board/film-temperature constraints.

← All design guides