How to use the LED resistor calculator
- Pick the LED color for a typical forward voltage, or type the forward voltage from the LED’s datasheet.
- Enter the supply voltage and the current you want through the LED in milliamps.
- For more than one LED, enter how many are in series in each string and how many strings run side by side.
- Read the exact resistance, the next standard value up and the current it gives, and the power and wattage rating. Choose “The current” to check a resistor you already have.
The LED resistor formula
Once an LED is lit, the voltage across it stays close to its forward voltage over a wide range of current, so a small rise in the voltage applied gives a big rise in current. A resistor in series sets the current instead: it takes up the difference between the supply and the LED, and Ohm’s law gives its value, R = (Vs − Vf) ÷ I, with the current in amps.
A red LED with a forward voltage of 2 V at 20 mA on a 9 V battery leaves 7 V across the resistor, so R = 7 ÷ 0.02 = 350 Ω. That is not a standard value; the next one up in the E24 series is 360 Ω, which gives 19.444 mA. Rounding up keeps the current at or just under the target, never over it.
Standard values and the current they give
Resistors come in the standard E series: E12 for 10% parts, E24 for 5% and E96 for 1%. The calculator picks the next value up in the series you choose and shows the values either side with the current each one gives. For the 9 V red LED, E12 gives 390 Ω at 17.949 mA, E24 gives 360 Ω, and E96 gives 357 Ω at 19.608 mA. Where a value just below is closer, it is shown too, with how far it pushes the current over the target: for E96 that is 348 Ω, 20.115 mA (+0.575%).
Power and wattage rating
The resistor turns the voltage across it into heat: P = V × I. For the 9 V red LED that is 136.11 mW, which a 1/4 W resistor covers; a 1/2 W resistor would run at half its rating and stay cooler. A 350 mA white power LED on 12 V puts 2.8033 W into its resistor, which needs a 3 W part and wastes most of the supply power: only 27.5% reaches the LED.
LEDs in series
LEDs in a string share the same current, so their forward voltages add up and one resistor sets the current for the whole string. Three red LEDs on 12 V drop 6 V together, leaving 6 V for the resistor: R = 6 ÷ 0.02 = 300 Ω, which is a standard value. A string uses the supply better than separate LEDs: 50% of the power goes into the three LEDs, against 16.67% for a single LED on the same 12 V.
The supply has to be higher than the total forward voltage, and the calculator shows how many LEDs fit in a string on your supply: 5 red LEDs on 12 V. In typical designs the LED voltages add up to around two-thirds of the supply, which leaves the rest for the resistor to hold the current steady.
Parallel strings
For more LEDs than one string can take, run several strings side by side, each with its own resistor. Four strings of three red LEDs on 12 V each need 300 Ω, and the supply has to provide 80 mA. One resistor shared by several LEDs in parallel is a poor idea: forward voltage varies a little between parts, so the LED with the lowest forward voltage takes most of the current and can fail early.
Why the supply needs headroom
Forward voltage is not exact. It changes from one LED to the next and falls as the LED warms up. When most of the supply is across the LEDs, a small change in forward voltage is a large change in the voltage left for the resistor, and so in the current. The calculator shows what happens if each LED drops 0.1 V less than entered. For the 9 V red LED the current only rises 1.43%, but a blue LED at 3.2 V on a 3.6 V supply leaves only 400 mV for the resistor, and the same 0.1 V raises the current by 25%. With five 2.2 V LEDs on 12 V, the resistor gets just 1 V and the current would rise by 50%. Close to the limit, a constant-current LED driver holds the current far better than a resistor.
Forward voltage by LED color
The forward voltage depends mainly on the color, because different colors are made from different semiconductor materials. The color list fills in a typical value for a small indicator LED; the real value for your part is in its datasheet, given at a stated current. These are the ranges Wikipedia gives for each color:
| Color | Typical | Range |
|---|---|---|
| Red | 2 V | 1.63 to 2.03 V |
| Orange | 2.1 V | 2.03 to 2.10 V |
| Yellow | 2.1 V | 2.10 to 2.18 V |
| Green | 2.2 V | 1.9 to 4.0 V |
| Blue | 3.2 V | 2.48 to 3.7 V |
| White | 3.3 V | 2.8 to 4.2 V |
| Infrared | 1.2 V | below 1.63 V |
| Ultraviolet | 3.3 V | 3 to 4.1 V |
| Pink | 3.3 V | about 3.3 V |
Green covers the widest range, 1.9 to 4.0 V, because both older gallium phosphide parts and bright pure-green indium gallium nitride parts are green, so check the datasheet for yours. Common currents for small indicator LEDs are 2 mA, 10 mA and 20 mA, and ultra-bright LEDs run at well under 1 mA can still serve as indicators. To check a resistor you already have, choose “The current”: a 330 Ω resistor with a red LED on 5 V gives 9.0909 mA.
Your values stay on your device
Everything is worked out in your browser. Nothing you type is sent anywhere or stored.
Frequently asked questions
How do I calculate the resistor for an LED?
Subtract the LED’s forward voltage from the supply voltage and divide by the current you want: R = (Vs − Vf) ÷ I, with I in amps. A red LED at 2 V and 20 mA on 9 V needs (9 − 2) ÷ 0.02 = 350 Ω, so use the next standard value up, 360 Ω, which gives 19.444 mA.
What wattage resistor do I need for an LED?
Multiply the voltage across the resistor by the current. The 9 V red LED puts 7 V across its resistor at about 19.4 mA, which is 136.11 mW: a 1/4 W resistor covers it, and 1/2 W runs cooler with a 2× margin.
What resistor do I need for an LED on 5 V or 12 V?
A white LED at 3.3 V and 20 mA on 5 V needs 85 Ω; the next E24 value up is 91 Ω. A red LED at 2 V on 12 V needs 500 Ω, so 510 Ω. Three red LEDs in series on 12 V need 300 Ω.
Can I use one resistor for several LEDs in parallel?
It is better not to. Forward voltage varies a little from one LED to the next, so the LED with the lowest forward voltage takes most of the current. Give each LED, or each series string, its own resistor; the calculator works out one resistor per string.
What happens if I use a bigger or smaller resistor?
A bigger resistor gives less current and a dimmer, cooler LED; a smaller one gives more current and can overload it. The table under the result shows the standard values either side with the current and power each gives: for the 9 V red LED, 330 Ω gives 21.212 mA and 390 Ω 17.949 mA.
Is anything I type sent anywhere?
No. Everything is worked out in your browser, and nothing you type is sent anywhere or stored.