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 color | Typical Vf | Usual range |
|---|---|---|
| Infrared | 1.2 V | 1.1–1.6 V |
| Red | 2.0 V | 1.8–2.2 V |
| Orange | 2.1 V | 2.0–2.2 V |
| Yellow | 2.1 V | 2.0–2.2 V |
| Green (classic, yellow-green) | 2.2 V | 1.9–2.4 V |
| Green (bright, pure green) | 3.0 V | 2.8–3.4 V |
| Blue | 3.2 V | 2.8–3.6 V |
| White | 3.2 V | 2.8–3.6 V |
| UV (violet) | 3.4 V | 3.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
| Supply | Red (2.0 V) | Yellow (2.1 V) | Bright green (3.0 V) | Blue / white (3.2 V) |
|---|---|---|---|---|
| 3.3 V | 68 Ω | 68 Ω | 15 Ω (!) | 5.6 Ω (!) |
| 5 V | 150 Ω | 150 Ω | 100 Ω | 100 Ω |
| 9 V | 390 Ω | 390 Ω | 330 Ω | 330 Ω |
| 12 V | 560 Ω | 560 Ω | 470 Ω | 470 Ω |
| 24 V | 1.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
- Ohm's Law Calculator — volts, amps, ohms and watts
- Resistor Color Code Calculator — find the resistor by its color bands
- Voltage Divider Calculator — make a smaller voltage with two resistors
- Battery Life Calculator — how long a battery runs your LEDs
- Electricity Cost Calculator — what your lights cost to run
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