LED Resistor Calculator

Find the right series resistor for any LED or LED string, with the nearest standard value, colour code and power rating.

  • Free, no signup
  • Works on mobile
  • Formula + worked example

How to use the LED resistor calculator

  1. Choose your LED colour — this fills in a typical forward voltage and current. Pick Custom to type values from the datasheet.
  2. Enter the supply voltage — 5 V for an Arduino Uno, 3.3 V for an ESP32, 9 V for a battery, 12 V for an adapter.
  3. Set how many LEDs are in series (connected end to end).
  4. Read the standard resistor value, its colour bands, the real LED current and how much power the resistor must handle.

The formula

The resistor takes up whatever voltage the LEDs do not use, and sets the current:

R = (V_supply − n × V_f) ÷ I_LED
  • V_supply – supply voltage
  • n – number of LEDs in series
  • V_f – forward voltage of one LED (from the datasheet)
  • I_LED – the current you want, in amps (15 mA = 0.015 A)

The resistor's power is P = (V_supply − n × V_f) × I_LED.

Typical LED forward voltages

LED colourTypical V_fTypical current
Red1.8 – 2.2 V10 – 20 mA
Yellow / Orange2.0 – 2.2 V10 – 20 mA
Standard green2.0 – 2.4 V10 – 20 mA
Bright / true green2.8 – 3.4 V10 – 20 mA
Blue / White2.9 – 3.4 V10 – 20 mA
Infrared1.2 – 1.5 V20 – 50 mA

These are typical values for small 3 mm and 5 mm LEDs. Always check the datasheet for your exact part, and never use power LEDs (1 W and above) with only a resistor — they need a constant-current driver.

Why round up to a standard value?

Resistors are sold in standard series. E12 has 12 values per decade (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82) and E24 has 24. Rounding up always gives slightly less current, which keeps the LED within its rating.

Series or parallel?

Several LEDs in series can share one resistor, and waste less power. LEDs in parallel should each get their own resistor, because no two LEDs are identical and one would take most of the current.

Want the theory behind this? Read Ohm's law explained with examples, or calculate other values with the Ohm's law calculator.

Frequently asked questions

Why does an LED need a resistor?+

An LED's current rises very steeply once the voltage passes its forward voltage. Without something to limit it, the current shoots up and the LED burns out. A series resistor sets a safe, steady current.

What resistor should I use for an LED on 5 V?+

For a typical red LED (about 2 V) at 15 mA on 5 V: R = (5 − 2) ÷ 0.015 = 200 Ω. Use 220 Ω if you only have E12 values — the LED will be very slightly dimmer and safer.

What resistor for an LED on an Arduino or ESP32 pin?+

On a 5 V Arduino Uno pin, 220 Ω to 330 Ω suits most red, yellow and green LEDs. On a 3.3 V ESP32 pin, use about 68 Ω to 100 Ω for red LEDs, and check the pin's current limit. Blue and white LEDs (about 3 V) barely light on 3.3 V.

Should I round the resistor value up or down?+

Round up to the next standard value. A slightly larger resistor gives a slightly lower current, which keeps the LED safe and is almost impossible to see as a brightness difference.

Can several LEDs share one resistor?+

LEDs in series can share one resistor, as long as the supply is higher than all their forward voltages added together. LEDs in parallel should each have their own resistor, because tiny differences between LEDs make one take most of the current.

From the Thinking Robot store

Shop all
All tools
WhatsApp