# LED series resistor calculator
A discrete LED is a current driven diode. The series resistor sets that current from Ohm's law: R = (Vs - n x Vf) / If. This calculator solves that in the browser, snaps to an E12 or E24 part, paints the color bands, and names a wattage with a factor of two of headroom. # A red LED on an Arduino 5 V pin
The search people actually type is "what resistor for a red LED on 5 V". Typical Vf is 2.0 V at 20 mA, so (5 - 2) / 0.02 = 150 ohms and 60 mW in the resistor. Buy 150 ohms, 125 mW or 250 mW. A 220 ohm part from the drawer also works: current falls to about 14 mA and the LED is dimmer, which is often what you want on a status pin. | Infrared | 1.3 V | 20 mA | 180 ohms |
| Red | 2.0 V | 20 mA | 150 ohms |
| Yellow or green | 2.2 V | 20 mA | 150 ohms |
| Blue or white | 3.2 V | 20 mA | 91 ohms |
| Ultraviolet | 3.4 V | 20 mA | 82 ohms |
# E12 and E24 preferred values
Resistors are manufactured on the IEC preferred number series. E12 is the common 10 percent set: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 and their decades. E24 fills the 5 percent set with extra steps such as 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75, and 91. The tool picks the nearest value and, when two values are equally close, the higher resistance so the LED runs a little dimmer rather than hotter. # When a series resistor is not enough
A resistor is not a current source. It only sets current for a chosen supply and a chosen Vf. Do not share one resistor across parallel LEDs: the lowest Vf hogs the current. Do not use a single resistor on a 1 W emitter, an LED strip, or a long 12 V automotive string. Those need a constant current driver. Color presets are typical bins; your LED's datasheet Vf at the rated current is the number that matters. -
Keep indicator LEDs near 10 mA to 20 mA unless the datasheet allows more.
-
Give each parallel LED its own resistor.
-
If the drop is under 1 V, a small Vf change causes a large current change.
-
On 12 V the resistor often needs 0.5 W, not a 125 mW film part.
-
Confirm anode, cathode, peak current, and wattage before you solder.
Typical Vf is not your lot
Red, blue, and white chips here are starting points for 5 mm indicators. Measure or read the manufacturer curve if the rail is 3.3 V, the LED is high power, or the part is infrared. If the supply sags, the LED Vf shifts with temperature, or several LEDs are paralleled, the current will move. Use the board as a bench starting point, then measure.