LED Resistor Calculator
Enter the supply voltage, the LED's color or forward voltage and the current you want. You get the exact resistance, the standard resistor to buy, its wattage, color bands and a circuit diagram.
| Series | Next higher (safe) | Nearest |
|---|
Circuit diagram
How to use the LED Resistor Calculator
- Enter the supply voltage, for example 5 V from USB or 12 V from an adapter.
- Choose the LED color or type the forward voltage from its datasheet.
- Set the current: 20 mA is typical for standard 5 mm LEDs; 2 to 10 mA is often bright enough for indicators.
- Choose the wiring and number of LEDs for a series string or parallel LEDs.
- Read the result: buy the recommended standard resistor with at least the wattage shown.
The LED resistor formula
R = (Vs − n × Vf) ÷ I
Vs is the supply voltage, Vf the LED forward voltage, n the number of LEDs in series and I the current in amps (20 mA = 0.02 A). The resistor's power is P = I² × R, and each LED uses Vf × I.
Example: a white LED (3.2 V) on a 9 V battery at 20 mA needs (9 − 3.2) ÷ 0.02 = 290 Ω. That is not a standard value, so use the next higher one: 330 Ω in E12 or 300 Ω in E24. With 330 Ω the actual current is 5.8 ÷ 330 = 17.6 mA and the resistor dissipates 0.0176² × 330 = 0.10 W, so a 1/4 W resistor gives a comfortable 2× margin.
Resistor values for common setups (20 mA)
| Supply | Red / yellow (2.0 V) | Green, true (3.2 V) | Blue / white (3.2 V) |
|---|---|---|---|
| 3.3 V | 65 Ω → 68 Ω | 5 Ω (too little headroom) | 5 Ω (too little headroom) |
| 5 V | 150 Ω | 90 Ω → 100 Ω | 90 Ω → 100 Ω |
| 9 V | 350 Ω → 390 Ω | 290 Ω → 330 Ω | 290 Ω → 330 Ω |
| 12 V | 500 Ω → 560 Ω | 440 Ω → 470 Ω | 440 Ω → 470 Ω |
| 24 V | 1,100 Ω → 1.2 kΩ (1 W) | 1,040 Ω → 1.2 kΩ (1 W) | 1,040 Ω → 1.2 kΩ (1 W) |
Values after the arrow are the next higher E12 standard resistor. For 3.3 V with blue or white LEDs, lower the current or check the datasheet's Vf, since only about 0.1 V is left for the resistor.
Typical LED forward voltages
| LED color | Typical Vf | Range | Wavelength |
|---|---|---|---|
| Infrared | 1.3 V | 1.2–1.6 V | 850–940 nm |
| Red | 2.0 V | 1.8–2.2 V | 620–660 nm |
| Orange / yellow | 2.1 V | 1.9–2.2 V | 585–610 nm |
| Green (classic, yellow-green) | 2.2 V | 2.0–2.4 V | 565–570 nm |
| Green (true, bright) | 3.2 V | 2.9–3.4 V | 520–530 nm |
| Blue | 3.2 V | 2.9–3.4 V | 460–470 nm |
| White | 3.2 V | 2.9–3.4 V | broad spectrum |
| UV / violet | 3.4 V | 3.1–3.8 V | 365–405 nm |
E12 and E24 standard resistor values
Resistors are sold in standard series that repeat in every decade (×1, ×10, ×100 …).
- E12: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82
- E24: 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91
So the E12 values around a few hundred ohms are 220, 270, 330, 390, 470, 560, 680 and 820 Ω.
Frequently asked questions
What resistor do I need for an LED on 5V?
For a red LED (about 2 V) at 20 mA on 5 V, the resistor is (5 − 2) ÷ 0.02 = 150 Ω, a standard value. For a blue or white LED (about 3.2 V) it is (5 − 3.2) ÷ 0.02 = 90 Ω, so use the next standard value of 100 Ω. A 1/4 W resistor is plenty for both.
What resistor do I need for an LED on 12V?
A single red LED at 20 mA on 12 V needs (12 − 2) ÷ 0.02 = 500 Ω, so use 560 Ω (E12) or 510 Ω (E24). It dissipates about 0.18 W, so use a 1/2 W resistor for a safe margin. Wiring three red LEDs in series instead needs only (12 − 6) ÷ 0.02 = 300 Ω and wastes less power.
Why does an LED need a resistor?
An LED's current rises very steeply once the voltage passes its forward voltage, so connecting it directly to a supply lets the current run away and burn it out. The resistor takes up the extra voltage and sets the current according to Ohm's law.
Should I use the next higher or the nearest resistor value?
Use the next higher standard value. It keeps the current at or slightly below your target, which is safer for the LED and barely changes the brightness. A lower value can push the current above the LED's rating.
Can I use one resistor for several LEDs in parallel?
It is not recommended. LEDs have slightly different forward voltages, so one LED takes more of the current, heats up and fails, and then the others get overloaded. Give each parallel LED its own resistor, or wire them in series with one resistor.
How do I calculate the resistor for LEDs in series?
Add up the forward voltages and subtract them from the supply, then divide by the current: R = (Vs − n × Vf) ÷ I. Three white LEDs (3.2 V each) on 12 V at 20 mA need (12 − 9.6) ÷ 0.02 = 120 Ω. The supply must be higher than the total forward voltage.
What wattage resistor do I need for an LED?
Calculate the power with P = I² × R and choose a resistor rated for at least twice that. A 150 Ω resistor at 20 mA dissipates 0.06 W, so a 1/8 W or 1/4 W resistor is fine. Higher supply voltages waste more power in the resistor and may need 1/2 W or 1 W parts.