KEMI
/

KEMI Tools

LED Resistor Calculator

Enter the supply voltage, LED forward voltage (Vf), target current and the number of LEDs in series to get the series resistor instantly. You also see the actual current with a purchasable E12/E24 value, the resistor's dissipation with a suggested rating and chip size, and how much the current moves with Vf spread — ready to drop into your schematic.

Standard series

Calculated resistance

300 Ω

R = (5 − 1×2) / 10 mA

Recommended (E24, next higher)

300 Ω

Actual current 10 mA · nearest value is 300 Ω

Resistor dissipation

30 mW

Suggested rating (2× margin): chip 0402 (1005) 1/16 W or larger · through-hole 1/4 W

LED power · efficiency

20 mW

40% of the input power reaches the LEDs; the rest is heat in the resistor.

If Vf varies by ±0.1 V per LED, the current moves between 9.67 mA and 10.3 mA. There's enough headroom for a plain resistor to keep the current reasonably stable.

ColorTypical Vf rangeTypical
Infrared (940 nm)1.2–1.5 V1.3 V
Red1.8–2.2 V2.0 V
Orange1.9–2.2 V2.0 V
Yellow1.9–2.2 V2.1 V
Yellow-green (GaP)1.9–2.3 V2.1 V
Green (InGaN)2.8–3.4 V3.1 V
Blue2.8–3.4 V3.1 V
White2.8–3.4 V3.1 V
UV (395 nm)3.0–3.6 V3.3 V

Approximate values for ordinary LEDs near 20 mA. Vf varies with maker, current and temperature — use the datasheet Vf (typ/max) for real designs.

How to use

  1. Enter the supply voltage Vs (e.g. 5 V, 12 V).
  2. Enter the LED's typical Vf from its datasheet, or press 'Use' in the color table below.
  3. Enter the target current (mA or A) and how many LEDs are in series.
  4. Read the recommended standard value, actual current, dissipation and suggested rating; if a warning appears, adjust the LED count or supply.

Basics

Why an LED needs a resistor

An LED is a diode whose brightness is set by current, not voltage. Near its forward voltage (Vf) the current rises exponentially, so connecting an LED straight to a supply means a 0.1 V excess can multiply the current several times and destroy it almost instantly. A series resistor is the simplest current limiter: it absorbs the leftover voltage and holds the current roughly constant. Subtract the LED voltage from the supply, and Ohm's law turns that leftover voltage and your target current into a resistance.

R = (Vs − n × Vf) / If
P_R = If² × R
Efficiency ≈ (n × Vf) / Vs
Vs = supply voltage, Vf = forward voltage of one LED, n = LEDs in series, If = target current, P_R = resistor dissipation

Worked examples

  • 5 V supply, one red LED (Vf 2.0 V), 10 mA: R = (5 − 2.0) / 0.01 = 300 Ω. 300 Ω is an E24 value, and dissipation is 0.01² × 300 = 30 mW, so an 0603 (1/10 W) chip is plenty.
  • 12 V supply, three white LEDs (Vf 3.1 V) in series, 20 mA: R = (12 − 9.3) / 0.02 = 135 Ω. There is no 135 Ω in E24, so the next value up, 150 Ω, gives 18 mA and about 49 mW in the resistor. With a 2× margin an 0603 (100 mW) is borderline; an 0805 (1/8 W) is the comfortable choice.

The calculator recommends the next higher standard value rather than the nearest one, because rounding down pushes the current above target. It still shows the nearest value, so pick that if you want a touch more brightness.

Current

How much current should an LED get?

The datasheet gives an absolute maximum continuous current (often 20–30 mA for small indicator LEDs) and a test current at which brightness and Vf are specified. You rarely need to run at either. Perceived brightness is roughly logarithmic, so halving the current looks much less than half as bright, and modern high-efficiency parts are clearly visible at 1–5 mA. Running well below the maximum also slows lumen depreciation and keeps the junction cooler, which matters in sealed enclosures because the allowed current derates as ambient temperature rises.

Driving an LED from a microcontroller pin

A red LED (Vf ≈ 2.0 V) on a 3.3 V GPIO at 2 mA needs R = (3.3 − 2.0) / 0.002 = 650 Ω; the next E24 value up is 680 Ω, giving about 1.9 mA. Blue, white and true-green LEDs (Vf ≈ 3.0–3.2 V) barely light from 3.3 V, so drive them from 5 V through a small transistor or MOSFET. Wiring the LED from the supply to the pin (active-low, the pin sinks current) is common because many MCUs sink current more strongly than they source it. Either way, check both the per-pin and the total-port current limits in the MCU datasheet.

Comparison

Resistor or constant-current driver?

Series resistorLinear CC driverSwitching (buck/boost) driver
Cost and partsLowest — one resistorLow — one small ICHigher — IC, inductor, diode
Current stabilityDepends on headroom and VfGoodGood
Efficiencyn·Vf / Vsn·Vf / Vs (excess burned in IC)Typically 85–95%
Best forIndicators, low currentStrings with modest headroomLighting, power LEDs, battery

Two further details catch people out. First, LEDs tolerate very little reverse voltage — often only about 5 V — so if the supply can be reversed or is AC, add a series or anti-parallel diode. Second, bi-color and RGB LEDs combine dies with different forward voltages (red near 2 V, green and blue near 3 V), so each color needs its own resistor; one shared resistor would make the red die hog the current.

Pitfalls

Common mistakes

  • Paralleling LEDs on one resistor: Vf varies slightly between parts, so the LED with the lowest Vf hogs the current. Give each parallel string its own resistor.
  • Designing with almost no headroom: a 3.1 V white LED on a 3.3 V rail leaves only 0.2 V across the resistor, so part spread and supply variation swing the current wildly. Check the 'Vf ±0.1 V' current range the tool shows.
  • Ignoring MCU pin limits: each GPIO and each port has a maximum current. Check the datasheet and use a transistor if you exceed it.
  • Sizing for average current under PWM: size the resistor for the peak (on-state) current.
  • Running the resistor at its exact rating: chip ratings are usually specified at 70 °C and derate above it. Choose at least twice the calculated dissipation.

In practice

Tips from KEMI's bench

Indicator LEDs need far less current than most people assume. Modern high-efficiency chip LEDs are clearly visible indoors at 1–5 mA, so habitually running 20 mA just wastes power and dazzles users; on battery products, cutting LED current is the easiest power saving there is. Conversely, for lighting or power LEDs at hundreds of milliamps, or long series strings with little headroom, a constant-current LED driver beats a resistor on both efficiency and stability. Electrically it makes no difference whether the resistor sits on the anode or cathode side, so choose whichever routes more cleanly. If decisions like these are holding up your schematic, KEMI's circuit design service can review the power section with you.

FAQ

Where do I find the LED's Vf?

Use the typical Forward Voltage from the LED datasheet. The table below is only a general range — even white LEDs vary from 2.8 to 3.4 V by maker and current.

Does the resistor go before or after the LED?

As long as it's in series, the current is identical on the anode or cathode side. Choose whichever is easier to route and place.

Can several LEDs share one resistor in parallel?

Not recommended. Vf spread makes one LED take most of the current, giving uneven brightness and shorter life. Wire them in series, or give each parallel branch its own resistor.

Can I drive a white LED from 3.3 V?

It will light, but only 0.2–0.5 V is left across the resistor, so current depends heavily on the individual LED. For consistent brightness use a 5 V rail or a constant-current driver.

Why double the resistor's power rating?

Chip resistor ratings are usually specified at 70 °C ambient and derate above that, and a part run near its rating gets hot enough to stress neighbours and the board. Running at 50% or less is the usual design margin.

See also

All calculations run locally in your browser; nothing you type is sent anywhere. Results are reference values for early design work — for production, part datasheets and your fabricator's specifications take precedence.