Skip to content

6 min read

What Resistor Do I Need for an LED?

Choose the resistor by subtracting the LED forward voltage from the supply voltage, then dividing by the current you want. One short calculation covers nearly every indicator LED.

Resistor colour bands and an LED connected in series on a breadboard

At a glance

Start with forward voltage

An LED does not behave like a resistor. Once it conducts, it holds a roughly fixed voltage across its terminals called the forward voltage. Red parts are commonly around 1.8 to 2.2 V, green close to 2 V, and blue or white parts around 3 to 3.3 V. The exact value is in the part’s datasheet.

The resistor must drop everything else. If the supply is 5 V and the LED drops 2 V, the resistor sees 3 V. That remaining voltage is what drives the current through the series circuit.

The formula

Resistance equals the supply voltage minus the forward voltage, divided by the desired current. Write the current in amperes: 20 milliamps is 0.020 A. For 5 V minus 2 V at 0.020 A, the result is 150 ohms. Since resistors come in standard values, pick the nearest value that is not lower than the answer.

Choosing a slightly larger resistor is safe and makes the LED a little dimmer. Choosing a smaller one pushes more current than intended and can damage the LED or the pin.

Worked examples at 5 V and 3.3 V

A red LED on 5 V at 10 milliamps needs about 300 ohms; 330 ohms is a standard nearby value. The same red LED on a 3.3 V board at 10 milliamps needs about 130 ohms; 150 ohms is a safe choice.

A white LED on 3.3 V with a forward voltage of 3 V leaves only 0.3 V for the resistor. At 10 milliamps that is 30 ohms, and small changes in forward voltage matter a lot. White and blue LEDs on 3.3 V are often run at lower current for this reason.

Why 220 ohms is everywhere

A 220 ohm resistor with a red LED on 5 V gives roughly 14 milliamps, comfortably below the usual 20 milliamp rating. It is a convenient, safe value that works for the most common beginner combination, which is why it appears in so many tutorials.

It is a starting point, not a universal rule. Recalculate whenever the colour, the board voltage or the desired brightness changes.

Check the power rating

Resistors also have a maximum power they can dissipate. Power equals current squared times resistance, or the voltage across the resistor times the current. In the examples above the value is well below one quarter of a watt, so a standard small resistor is fine.

If you drive many LEDs or use a higher supply voltage, repeat this check. A resistor that is electrically the right value but physically too small will overheat.

One resistor per LED

Each LED needs its own series resistor. Putting several LEDs in parallel behind a single resistor gives each branch a slightly different voltage drop, so the currents are unequal and one LED can take far more than expected.

If you need many LEDs, either give each one a resistor or use a driver designed for the job. Keeping the calculation per LED also makes it easy to replace one part later without recalculating the whole circuit.

Frequently asked questions

Is 220 ohms safe for a red LED on 5 V?

Yes. It typically gives about 14 mA, below the common 20 mA rating.

What about a blue LED on 3.3 V?

Blue LEDs need about 3 V, so little voltage is left for the resistor. Use a smaller resistor and a lower target current, or check the datasheet.

Can I use one resistor for two LEDs?

Not in parallel. Each LED needs its own resistor because small differences in forward voltage cause unequal currents.

What if my calculation gives a value I do not have?

Choose the next higher standard resistor value. The LED will be slightly dimmer but the circuit stays safe.

Related pages