How to Choose the Right Resistor for an LED

Calculate the correct current-limiting resistor for any LED. Covers forward voltage, standard resistor values, and common mistakes.

Andreas · April 16, 2026 · 5 min read
How to Choose the Right Resistor for an LED

Every LED needs a current-limiting resistor. Without one, the LED draws too much current, overheats, and burns out — sometimes in under a second. The formula is simple: R = (V_supply − V_forward) / I_forward. But picking the right values requires knowing a few things about your specific LED and power source.

The formula

R = (V_supply − V_LED) / I_LED

Where:

  • V_supply = your power source voltage (e.g., 5V from USB, 3.3V from a microcontroller pin, 9V from a battery)
  • V_LED = the LED's forward voltage (depends on color)
  • I_LED = the desired current through the LED (typically 10–20 mA)

Forward voltage by LED color

Color Typical V_forward Range
Red 1.8 V 1.6–2.0 V
Orange 2.0 V 1.8–2.2 V
Yellow 2.0 V 1.8–2.2 V
Green 2.2 V 2.0–3.0 V
Blue 3.2 V 2.8–3.6 V
White 3.2 V 3.0–3.6 V
UV 3.3 V 3.0–3.6 V

These vary by manufacturer. Check the datasheet if you have it. If not, the typical values above will work fine for most standard 5mm LEDs.

Worked examples

Red LED on 5V (Arduino/USB)

R = (5 − 1.8) / 0.02 = 3.2 / 0.02 = 160 Ω

The nearest standard value is 150 Ω (slightly more current) or 180 Ω (slightly less). Either works. Most people grab a 220 Ω from the bin — the LED is a bit dimmer but well within safe limits.

White LED on 3.3V (Raspberry Pi GPIO)

R = (3.3 − 3.2) / 0.01 = 0.1 / 0.01 = 10 Ω

That's barely any headroom. At 3.3V, white and blue LEDs are right at the edge. You'll get dim output. If you need full brightness, use a 5V source with a transistor or MOSFET switched by the 3.3V GPIO.

Green LED on 9V battery

R = (9 − 2.2) / 0.02 = 6.8 / 0.02 = 340 Ω

Nearest standard: 330 Ω. The resistor will dissipate P = (9 − 2.2) × 0.02 = 0.136 W. A standard 1/4 watt resistor handles this easily.

Use the LED resistor calculator to skip the math and get the nearest E24 standard value automatically.

Why you can't skip the resistor

LEDs are diodes. Once forward-biased, their resistance drops dramatically. Without a limiting resistor, current rises until something fails — the LED, the GPIO pin, or the power supply. On a Raspberry Pi, a shorted GPIO pin can permanently damage the SoC.

A resistor in series limits the current to a safe level. It's the cheapest insurance in electronics.

Standard resistor values (E24 series)

You can't buy a 160 Ω resistor. The E24 series defines the available values per decade:

10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91

Then multiply by 1, 10, 100, 1k, etc. So you get 150, 160 doesn't exist, 180, etc. The LED calculator automatically rounds to the nearest E24 value.

Common mistakes

Using the same resistor for every LED color

A 330 Ω resistor works fine for a red LED on 5V (about 10 mA). But a blue LED with 3.2V forward voltage on the same 5V supply with 330 Ω gets only (5 − 3.2) / 330 = 5.5 mA — noticeably dim. Different colors need different resistors for equal brightness.

Forgetting power dissipation

At 20 mA through a single LED, power is negligible. But if you're driving 50 LEDs from a 12V supply, the total resistor dissipation adds up. Always check P = (V_supply − V_LED) × I_LED per resistor.

Running multiple LEDs in series without recalculating

Two red LEDs in series need R = (5 − 1.8 − 1.8) / 0.02 = 70 Ω. Not 160 Ω. The forward voltages add up. Three red LEDs in series on 5V won't light at all — 3 × 1.8 = 5.4V exceeds the supply.

Resistor placement: before or after the LED?

Either works. Current through a series circuit is the same at every point. Putting the resistor before the LED (between supply and anode) or after (between cathode and ground) makes no electrical difference. Convention usually places it before, but it doesn't matter.

Quick reference

LED Color 3.3V Supply 5V Supply 9V Supply 12V Supply
Red (1.8V) 75 Ω 160 Ω 360 Ω 510 Ω
Green (2.2V) 56 Ω 140 Ω 340 Ω 490 Ω
Blue (3.2V) 10 Ω 90 Ω 290 Ω 440 Ω
White (3.2V) 10 Ω 90 Ω 290 Ω 440 Ω

Values calculated at 20 mA. Use the LED resistor calculator for exact nearest standard values.

Need to identify a resistor you already have? The resistor color code decoder reads 4-band and 5-band markings. For power calculations beyond LEDs, the power calculator handles voltage, current, resistance, and wattage.

Comments