An LED must have its current limited, or it will draw too much and burn out. For indicator LEDs, a single series resistor is all you need.

The formula

R = (Vsupply − Vf) ÷ I

  • Vsupply is your supply voltage.
  • Vf is the LED's forward voltage, from its datasheet.
  • I is the current you want, in amps.

Typical forward voltages

LED colourTypical Vf
Red1.8 to 2.2 V
Yellow2.0 to 2.2 V
Green (standard)2.0 to 2.2 V
Blue, white, pure green2.8 to 3.3 V

These are typical figures. Use the value from the datasheet of the part you buy.

Worked example: red LED on 5 V

A red LED with Vf = 2.0 V at 10 mA from a 5 V supply:

R = (5 − 2.0) ÷ 0.010 = 300 Ω

300 Ω is not in the common E12 series. Choose the next value up, 330 Ω, which gives about 9 mA. Going up rather than down keeps the current at or below your target.

Worked example: blue LED on 3.3 V

A blue LED with Vf = 3.0 V at 5 mA from 3.3 V:

R = (3.3 − 3.0) ÷ 0.005 = 60 Ω → use 68 Ω

Here only 0.3 V is left across the resistor, so small variations in Vf or the supply change the current a lot. If brightness consistency matters, run blue and white LEDs from 5 V instead.

How much current?

Modern indicator LEDs are bright. 2 to 5 mA is usually plenty for a status light, and 10 mA is bright. Also check the limit of whatever is driving the LED — many microcontroller pins should not source more than about 20 mA, and less is better.

Check the resistor's power

Power = I² × R

For 10 mA through 330 Ω: 0.010² × 330 = 0.033 W. Any 0603 or larger chip resistor handles that easily. Power only becomes a concern with higher currents or higher supply voltages.

Several LEDs

  • One resistor per LED when wiring LEDs in parallel. Sharing one resistor lets the LED with the lowest Vf take most of the current.
  • LEDs in series share the same current and need one resistor: subtract the sum of the forward voltages from the supply.

Find LEDs by colour and package, and resistors by value — try searching 330R 0805. New to the notation? See how to read resistor values.