LED Resistor Calculator

Calculate the resistor to use in a circuit with an LED by entering the supply voltage, forward voltage, and forward current below. Optionally calculate the resistor to accommodate multiple LEDs connected in series.

V
V
mA

Results:

Resistor Value
 
Resistor Wattage Recommendation
 
W
Learn how we calculated this below

scroll down


On this page:


How to Calculate the Size of Resistor to use with an LED

Light-emitting diodes, or LEDs, used in electrical circuits should be paired with a resistor to control the current. This is necessary to prevent drawing more current than the LED is rated for, which could cause damage to the component.

To determine the correct resistor value, Ohm’s Law is used to derive a formula for the resistor.

LED Resistor Calculation Formula

R(Ω) = Vs − (Vf × N) / If

The resistance required is equal to the supply voltage minus the forward voltage times the number of LEDs, divided by the forward current.

Vs – or supply voltage – is equal to the voltage supplied to the circuit.

Vf – or forward voltage – is equal to the LED voltage drop. This value is different for various color LEDs, see the chart below for the voltage drop for different LED colors.

If – or forward current – is equal to the current draw of the LED. Most LEDs are rated for 20-30 mA.

N is the number of LEDs connected in series.

Electrical circuit diagram showing an LED and resistor
Diagram showing a circuit with an LED and the required resistor.

For example, find the resistor to use for an LED with a forward voltage of 2 volts and current of 20 milliamps when using a supply voltage of 5V.

R = 5 V − 2 V / 0.02 A
R = 3 V / 0.02 A
R = 150 Ω

Chart showing the voltage drop, or forward voltage for different LED colors, along with the recommended resistor size for the given forward current and supply voltage.
Color Typical Forward Voltage (Vf) Supply Voltage (Vs) Forward Current (If) Recommended Resistor Size Recommended Resistor Power Rating
Red 2 V 5 V 20 mA 150 Ω 0.06 W
Green 2.1 V 5 V 20 mA 145 Ω 0.058 W
Blue 3.6 V 5 V 20 mA 70 Ω 0.028 W
White 3.6 V 5 V 20 mA 70 Ω 0.028 W
Yellow 2.1 V 5 V 20 mA 145 Ω 0.058 W
Orange 2.2 V 5 V 20 mA 140 Ω 0.056 W
Amber 2.1 V 5 V 20 mA 145 Ω 0.058 W
Infrared 1.7 V 5 V 20 mA 165 Ω 0.066 W