Electronics · LEDs

LED resistor calculator.

Enter the supply voltage, the LED's forward voltage and the current you want. You get the resistor to use, with the standard values to buy.

R = (Vs − Vf) / IE12 and E24 valuesResistor watts

Advertisement

Inputs

Presets use the low end of the range in the Wikipedia LED table, so the real current comes out at or below your target. Use your LED datasheet when you have it.
Basic LEDs are usually rated around 20 mA at most (SparkFun). Staying well below the rating is the safe choice.

Result

Enter the supply voltage.

How to size a resistor for an LED

Resistor = (supply voltage − LED forward voltage) ÷ the current you want. The resistor takes up the voltage the LED does not, and Ohm's law sets the current. With several LEDs in series, add their forward voltages first.

Worked example (SparkFun's). A 9 V battery, a red LED at 1.8 V and 10 mA: (9 − 1.8) ÷ 0.010 = 720 Ω. The next standard values up are 750 Ω (E24, 9.6 mA) and 820 Ω (E12, 8.78 mA). Round up, never down, so the current stays at or below your target. The resistor dissipates about 72 mW, so a small 1/4 W resistor has plenty of room.

Forward voltage by color. Wikipedia's table gives red 1.63 to 2.03 V, orange 2.03 to 2.10, yellow 2.10 to 2.18, green 1.9 to 4.0, blue 2.48 to 3.7 and violet 2.76 to 4.0. The presets here use the lower figure, which gives a slightly larger resistor and a slightly dimmer, safer LED. SparkFun gives 1.7 to 3.4 V as the usual spread across colors.

Resistor wattage. Power in the resistor is I²R. As a common rule of thumb, not a published standard, pick a resistor rated at about twice the calculated power; this tool shows that figure. For a 5 V supply, a red LED at the 1.63 V preset and 10 mA the exact value is 337 Ω.

Frequently asked questions

What resistor do I need for a 5V LED circuit?

For a red LED (1.63 V low end) at 10 mA from 5 V: (5 − 1.63) ÷ 0.010 = 337 Ω, so use the next standard value up, 360 Ω (E24). Change the color and current in the calculator for other LEDs.

Do I always round the resistor up?

Yes. A higher resistance gives a lower current, which is the safe direction. A lower value than calculated can push the LED past its rating.

Can I power several LEDs from one resistor?

In series, yes: add the forward voltages and the same current flows through all of them. The supply must be higher than the total drop. In parallel, give each LED its own resistor because their forward voltages differ.

What if my LED has a built-in resistor?

Some 5 V and 12 V LEDs already include a series resistor, as noted on Wikipedia. Do not add another unless the datasheet says to.

Why does the result say the supply is too low?

The supply must be above the LED's forward voltage (times the number of LEDs in series), or the LED will not light and there is nothing for the resistor to drop.

Sources

Checked

Runs entirely in your browser. Nothing you type is sent or stored.

Scope and safety

Low-voltage hobby use only. These results are arithmetic from the formulas shown, not an engineering design or professional advice. Real parts vary with tolerance, temperature and age, so check the datasheet for every part. Never work on mains-powered circuits from a calculator result, and treat lithium and other rechargeable batteries with care.

Advertisement
Advertisement