LED Resistor Calculator

The right resistor for your LED — value, standard size and wattage.

100% private — runs entirely in your browser. Your data is processed on your device and never sent to the internet.

Everything is worked out in your browser and saved on this device for next time.

About LED resistors

An LED needs a resistor in series to limit its current. Without one, the LED draws far too much current and burns out in a moment — and it can damage the pin of your board too.

The resistor value comes from one simple formula:

R = (Vs − n × Vf) ÷ I

  • Vs — the supply voltage (3.3 V, 5 V, 9 V, 12 V …)
  • Vf — the LED's forward voltage (about 2 V for red, 3.2 V for blue and white)
  • n — the number of LEDs in series
  • I — the current you want: often 20 mA (0.02 A), less for modern bright LEDs

This calculator works it out, picks the next standard resistor value up (so the current is never higher than you asked for), and tells you how much power the resistor turns into heat.

Features

  • LED colors — red, orange, yellow, green, blue, white, UV and infrared, each with a typical forward voltage you can change
  • Quick chips — supplies of 3.3, 5, 9, 12 and 24 V; currents from 5 to 30 mA
  • LEDs in series — one resistor for a string of LEDs
  • Standard value — the next E12 or E24 value up, and the real current with it
  • Wattage — the power in the resistor and a safe rating (1/8 W, 1/4 W …)
  • Circuit drawing — supply, resistor and LEDs with your values
  • Warnings — when the supply is too low, or leaves too little voltage for the resistor

Forward voltage by LED color

LED colorTypical VfUsual range
Infrared1.2 V1.1–1.6 V
Red2.0 V1.8–2.2 V
Orange2.1 V2.0–2.2 V
Yellow2.1 V2.0–2.2 V
Green (classic, yellow-green)2.2 V1.9–2.4 V
Green (bright, pure green)3.0 V2.8–3.4 V
Blue3.2 V2.8–3.6 V
White3.2 V2.8–3.6 V
UV (violet)3.4 V3.1–4.0 V

The data sheet of your LED gives the exact value. A small difference changes the current only a little when the supply is much higher than Vf.

Resistor for one LED at 20 mA

SupplyRed (2.0 V)Yellow (2.1 V)Bright green (3.0 V)Blue / white (3.2 V)
3.3 V68 Ω68 Ω15 Ω (!)5.6 Ω (!)
5 V150 Ω150 Ω100 Ω100 Ω
9 V390 Ω390 Ω330 Ω330 Ω
12 V560 Ω560 Ω470 Ω470 Ω
24 V1.2 kΩ1.2 kΩ1.2 kΩ1.2 kΩ

All values are the next E12 value up. (!) means less than 0.6 V is left for the resistor, so the current changes a lot with small changes in the supply. On 3.3 V, run blue and white LEDs at a lower current, or from 5 V. On 24 V the resistor uses about 0.4 W, so take a 1 W part.

Arduino and other boards

On an Arduino Uno (5 V pins), a red LED with a 220 Ω resistor draws (5 − 2) ÷ 220 = 13.6 mA — bright enough, and easy on the pin. That is why 220 Ω and 330 Ω resistors are in every starter kit. An Uno pin should give 20 mA or less (40 mA is the absolute limit). On a 3.3 V board like the ESP32, the same red LED with 220 Ω gets (3.3 − 2) ÷ 220 = 5.9 mA.

LEDs in series

LEDs in one string share one current, so one resistor is enough: R = (Vs − n × Vf) ÷ I.

  • 3 white LEDs on 12 V at 20 mA: (12 − 3 × 3.2) ÷ 0.02 = 2.4 ÷ 0.02 = 120 Ω — an E12 value.
  • 4 red LEDs on 12 V at 20 mA: (12 − 4 × 2.0) ÷ 0.02 = 200 Ω → the next E12 value is 220 Ω, which gives 18.2 mA.

Do not put LEDs side by side (in parallel) on one shared resistor: one LED takes most of the current. Give each string its own resistor.

Frequently asked questions

What resistor do I need for an LED on 5 V?

For a red LED at 20 mA: (5 − 2) ÷ 0.02 = 150 Ω. A 220 Ω or 330 Ω resistor also works and makes the LED a little dimmer and safer.

Can I use a bigger resistor?

Yes. A bigger resistor gives less current, so the LED is dimmer and lasts longer. A smaller one gives more current and can destroy the LED.

What wattage should the resistor have?

At least twice the power it uses. For small LEDs on 5 V that is far below 1/4 W, so any common resistor works. On 12 V or 24 V check the result: 24 V at 20 mA needs a 1 W resistor.

Why is the resistor rounded up?

Resistors come in standard values (E12: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 and the same in every decade). Rounding up keeps the current at or below what you asked for.

Does it matter which side of the LED the resistor goes on?

No. The resistor can go before or after the LED. The LED itself has a direction: the long leg (anode) goes to plus.

Do LED strips need a resistor?

Most 12 V and 24 V LED strips already have resistors built in. Connect them to the voltage printed on the strip, with no extra resistor.

Related tools

How to use it

  • Type the supply voltage or tap 3.3 V, 5 V, 9 V, 12 V or 24 V
  • Pick the LED color — the forward voltage fills in (change it if your data sheet says otherwise)
  • Set the current — 20 mA is common, 5–10 mA is enough for many bright LEDs
  • Set how many LEDs in series you have
  • Read the resistor to use, its real current and its wattage

We add new tools regularly — subscribe on YouTube to be notified when each one goes live.

More tools

View all

Recommended Apps

View all