This calculator works out the current-limiting resistor you need in series with an LED.
R1 =
Power =
An LED needs a resistor in series with it to control the current. Every LED has a forward voltage, the voltage at which it starts to conduct and light up, that depends on its colour and construction. Once you pass that voltage, an LED draws current very steeply for any further increase, so without something to limit it the current climbs until the LED is damaged or its life is cut short. A single series resistor is the simplest and cheapest way to hold the current where you want it.
You'll find the forward voltage and maximum current in the LED's datasheet. If you're running several LEDs in series, add their forward voltages together; the current stays the same as for one LED.
Working out the resistor
You need three figures: the supply voltage (Vsupply), the LED's forward voltage (Vf) and the current you want through it (If).
-
Supply voltage: The voltage of the source driving the LED.
-
Forward voltage: The drop across the LED when it's conducting, from the datasheet. Typical values are:
- Red: ~2.0V
- Green: ~2.0-3.0V
- Blue: ~3.0-3.5V
- White: ~3.0-3.5V
-
Forward current: The current you want flowing, again from the datasheet. Standard LEDs usually want somewhere around 10–20 mA.
-
Apply Ohm's Law: Subtract the forward voltage from the supply, then divide by the current
Example
Let's go through an example calculation.
Say the supply is 9 V, the LED drops 2 V, and you want 20 mA (0.020 A) through it.
The resistor has to drop the difference: 9 V − 2 V = 7 V.
Then apply Ohm's Law:
So you need 350 Ω.
Picking a real resistor
You won't find an exact 350 Ω resistor in the standard ranges, so go to the nearest value of 360 Ω. Rounding up slightly lowers the current a touch, which is the safe direction to err.
Check the power rating
Make sure the resistor can handle the power it dissipates:
P = VR × If = 7V × 0.020A = 0.14W
A quarter-watt (0.25 W) resistor comfortably covers 0.14 W, so that's the part to fit here.
In short
Find the supply voltage, the LED's forward voltage and the current you want, apply Ohm's Law to the voltage the resistor has to drop, round to the nearest standard value, and check the resistor's power rating will take it.