LED resistor calculator
Enter the supply voltage, the forward voltage of the LED, the current you want and how many LEDs you put in series. The calculator gives the exact resistance, the next standard E24 and E12 values, the current you really get with the standard resistor and the power it dissipates, so you can choose a resistor that is safe.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Enter the supply voltage, for example 5 V from USB, 9 V from a battery, or 12 V.
- Enter the LED’s forward voltage, from its datasheet, and the current you want in milliamps. Standard indicator LEDs are commonly run at about 10 to 20 mA, but check the rating of yours.
- If you chain LEDs in series, enter how many.
- Choose the resistor: use the E24 value if you have the 5 % series, otherwise the E12 value.
- Resistance: R = (supply − number of LEDs × forward voltage) ÷ current.
- Power in the resistor: P = I² × R, using the standard value you pick.
- Actual current with a standard resistor: I = (supply − number of LEDs × forward voltage) ÷ R.
Worked example
A 9 V battery, a red LED with a 2 V forward voltage and 20 mA. The resistor must drop 7 V at 20 mA, which is 350 Ω. The next E24 value is 360 Ω, which gives 7 ÷ 360 = 19.4 mA and dissipates 7² ÷ 360 = 136 mW. Twice that is 0.27 W, so use a 1/2 W resistor. The next E12 value is 390 Ω.
Tips
- For a brighter LED, do not go above its maximum current. For a long life, running at less than the maximum is better.
- If the supply voltage changes, as on a battery, calculate with the highest voltage the supply can reach.
- A 3.3 V supply can drive a red LED, but may not be enough for a blue or white LED with a forward voltage of 3.2 V or more.
Frequently asked questions
How do I calculate the resistor for an LED?
Subtract the LED's forward voltage from the supply voltage and divide the result by the current you want, in amps. For a 9 V supply, a 2 V LED and 20 mA this is (9 − 2) ÷ 0.020 = 350 Ω. The resistor drops the voltage the LED does not use.
Why does the tool round up to a standard value?
Resistors are sold in standard series, and a lower value than calculated would give the LED more current than you chose. The tool takes the nearest value that is equal to or higher than the exact result, so the current is the same or a little lower. E12 has 12 values per decade (10 % tolerance) and E24 has 24 (5 %).
What forward voltage should I use?
Check the datasheet. As a rough guide, red LEDs are about 1.8 to 2.2 V, yellow and green about 2.0 to 2.4 V and blue and white about 3.0 to 3.4 V. The forward voltage changes with current, so use the value for the current you choose.
Can I use one resistor for several LEDs?
In series, yes: enter how many LEDs, and the tool subtracts all their forward voltages, which must add up to less than the supply. For LEDs in parallel, give each LED its own resistor, because their forward voltages differ slightly and one would take more current.
How is the minimum resistor rating chosen?
The tool computes the power in the standard E24 resistor, I² × R, and picks the smallest common rating (1/8, 1/4, 1/2, 1, 2 or 5 W) that is at least twice that power. The margin keeps the resistor from running hot.