About LED Resistor Calculator
An LED's forward voltage barely changes as current through it rises — which sounds convenient and is actually the problem. Without something else in the circuit limiting current, a tiny rise in supply voltage drives a large, uncontrolled rise in current, and an LED destroys itself in milliseconds run this way. The resistor is what actually sets the current: it drops whatever voltage the LED doesn't, and Ohm's law pins the resulting current to a safe, predictable value.
Forward voltage depends on the semiconductor material an LED is made from, which is also what determines its colour — red, yellow and orange LEDs typically drop around 2V, while green, blue and white ones drop more, often 3V or higher. This is why a resistor calculated for a red LED is usually wrong for a blue one on the same supply, even at the same target current.
The result includes the nearest E24 (5% tolerance) resistor value, rounded up rather than down or to the closest — a slightly higher resistance means slightly lower current than calculated, which is the safe direction to round in. It also recommends a power rating with headroom, since running a resistor at exactly its rated power leaves it hot and its value drifting.
How to calculate an LED's series resistor
Enter the supply voltage
What the LED and resistor together are connected across.
Choose the LED colour or forward voltage
Or enter a custom value from the LED's datasheet.
Set the target current
20mA is typical for a standard 5mm LED; check the datasheet for anything unusual.
Read the resistor value
Both the exact calculated value and the nearest real one you can buy.