This free LED resistor calculator finds the current-limiting resistor for one LED or a string of LEDs in series. Enter the supply voltage — 3.3 V, 5 V, 9 V, 12 V, 24 V or any other — and the LED color or forward voltage to get the nearest standard resistor value, the actual LED current and the resistor wattage you need. It works for Arduino, ESP32 and Raspberry Pi projects, car and 12 V lighting, and LED strips.
LED resistor formula
R = (Vsupply − n × Vf) ÷ I
P(resistor) = I² × R
Vf is the LED's forward voltage, n is the number of LEDs in series and I is the LED current in amps (mA ÷ 1000). The result is rounded up to the next standard E12 or E24 value, and the actual current is recalculated with that value.
Worked example: three white LEDs on 12 V
Three white LEDs at 3.1 V each drop 9.3 V, leaving 12 − 9.3 = 2.7 V for the resistor. At 20 mA: 2.7 ÷ 0.02 = 135 Ω, rounded up to 150 Ω (E24), giving 18 mA. The resistor dissipates 0.018² × 150 ≈ 49 mW, so a 1/4 W resistor is plenty.
LED resistor chart (20 mA, single LED)
Standard E24 resistor for one LED at 20 mA, rounded up. Use the calculator for other currents or LEDs in series. On 3.3 V, run LEDs at a lower current, since a small change in supply or LED voltage makes a big difference.
| Supply | Red (~2 V) | Yellow (~2.1 V) | Green (~2.2 V) | Blue / white (~3.1 V) |
|---|---|---|---|---|
| 3.3 V | 68 Ω | 62 Ω | 56 Ω | 10 Ω * |
| 5 V | 150 Ω | 150 Ω | 150 Ω | 100 Ω |
| 9 V | 360 Ω | 360 Ω | 360 Ω | 300 Ω |
| 12 V | 510 Ω | 510 Ω | 510 Ω | 470 Ω |
| 24 V | 1.1 kΩ | 1.1 kΩ | 1.1 kΩ | 1.1 kΩ |
* Not recommended: so little voltage is left for the resistor that the LED current will vary a lot with supply and LED tolerance.
Once you have the value, find its color bands with the resistor color code calculator.
Typical LED forward voltages
| Color | Forward voltage |
|---|---|
| Infrared | 1.2–1.5 V |
| Red / orange | 1.8–2.2 V |
| Yellow | 1.9–2.2 V |
| Green (standard) | 2.0–2.4 V |
| Green (InGaN, bright) | 2.8–3.4 V |
| Blue / white | 2.8–3.4 V |
| UV | 3.0–3.8 V |
Exact values vary with the part and current — the datasheet's typical Vf at your chosen current is best.