How the resistor is calculated
An LED only lights once the voltage across it reaches its forward voltage, and above that the current climbs very fast. The resistor takes the rest of the supply voltage and sets the current.
R = (Vs − n × Vf) ÷ I P = I² × R
Example: 5 V supply, one red LED at 2 V, 10 mA. R = (5 − 2) ÷ 0.010 = 300 Ω. The next standard E12 value up is 330 Ω, which gives 9.1 mA. Rounding up keeps the current at or below what you asked for.
Forward voltage by colour
| LED colour | Vf typ. | Vf max |
|---|---|---|
| Red | 1.8–2 V | 2.5 V |
| Orange | 1.9–2 V | 2.5 V |
| Yellow | 1.9–2.1 V | 2.5 V |
| Yellow-green (classic green) | 2–2.2 V | 2.5 V |
| Green (bright, InGaN) | 2.9–3.2 V | 4 V |
| Blue | 2.8–3.1 V | 4 V |
| White | 2.8–3.1 V | 4 V |
| UV 395–405 nm | 3–3.3 V | 4 V |
| Infrared 940 nm | 1.2–1.25 V | 1.6 V |
| Infrared 850 nm | 1.4–1.5 V | 1.8 V |
Typical and maximum values at about 20 mA for 3 mm, 5 mm and small SMD indicator LEDs, from manufacturer datasheets. Power LEDs and LED strips have their own figures.
How much current
Today’s indicator LEDs are clearly visible at 2 to 5 mA and bright at 10 mA. 20 mA is the usual rated current for 3 and 5 mm LEDs and for 0603 or 0805 SMD LEDs, with a maximum of typically 20–30 mA, so 10 mA is a safe default that also spares your battery.
Power rating and higher voltages
The resistor turns I² × R into heat. Choose a part rated for at least twice that: SMD resistors are typically 1/16 W in 0402, 1/10 W in 0603, 1/8 W in 0805 and 1/4 W in 1206. At 12 or 24 V a single LED wastes most of the power in the resistor, so put several LEDs in series on one resistor, each string with its own.
Frequently asked questions
What resistor do I need for an LED on 5 V?
For a red LED at 10 mA, 330 Ω (about 9 mA). For a blue or white LED at 10 mA, 220 Ω (about 8.6 mA). Use the calculator for other colours and currents.
And on 3.3 V?
A red LED at 10 mA needs 150 Ω. Blue and white LEDs need about 3 V, so 3.3 V leaves almost nothing for the resistor: brightness then changes a lot from one LED to another. Use a low current and test, or drive the LED from 5 V through a transistor.
Can one resistor serve several LEDs in parallel?
It works badly. Forward voltages differ slightly, and the LED with the lowest one takes most of the current. Give each LED, or each series string, its own resistor.
Why round up to the next standard value?
A higher resistance means slightly less current, which is always safe. With E12 values the current can come out up to about 20 % lower (13 % with E24), which the eye hardly notices.
Do LED strips or drivers need a resistor?
No. 12 V and 24 V LED strips already have resistors or constant-current chips on the strip, and constant-current drivers regulate the current themselves. The calculator is for single LEDs and strings you wire yourself.