LED Resistor Calculator
Series resistor for one LED or a string of LEDs from supply voltage, forward voltage and current: exact ohms, the E24 value above it, power and rating. How it works
Use the LED Resistor Calculator
About the LED Resistor Calculator
At 5 V with a red LED (2.0 V forward voltage) at 20 mA, the series resistor is (5 − 2.0) ÷ 0.02 = 150 Ω. That is an E24 value, it dissipates 60 mW, and the calculator suggests a 1/8 W resistor or larger: the smallest stocked rating that is at least twice the power.
Series resistor for the preset LEDs on 5 V and 12 V supplies
| LED preset | Forward voltage, current | 5 V supply | 12 V supply |
|---|---|---|---|
| Red | 2.0 V, 20 mA | 150 Ω, 60 mW, 1/8 W | 510 Ω, 196 mW, 1/2 W |
| Green | 2.1 V, 20 mA | 150 Ω, 56 mW, 1/8 W | 510 Ω, 192 mW, 1/2 W |
| Blue | 3.3 V, 20 mA | 91 Ω, 32 mW, 1/8 W | 470 Ω, 161 mW, 1/2 W |
| White | 3.3 V, 20 mA | 91 Ω, 32 mW, 1/8 W | 470 Ω, 161 mW, 1/2 W |
| Infrared | 1.5 V, 50 mA | 75 Ω, 163 mW, 1/2 W | 220 Ω, 501 mW, 2 W |
| UV | 3.8 V, 20 mA | 62 Ω, 23 mW, 1/8 W | 430 Ω, 156 mW, 1/2 W |
Each cell is the E24 resistor, the power it really dissipates (a rounded-up resistor passes a little less than the target current) and the suggested rating, which is sized from the power at the full target current. The forward voltages and currents are the calculator’s presets, not datasheet values: use the figures for your LED.
How to use this tool
- Enter the supply voltage, the LED forward voltage and the LED current in mA, or press a color preset.
- For a string of LEDs in series, enter how many there are; the forward voltages are added up.
- Read the exact resistance, the E24 value at or above it and the LED current that value really passes.
- Check the power in that resistor and the suggested rating, then compare both with the LED and resistor datasheets.
Frequently asked questions
- What resistor do I need for an LED on 5 V?
- For a red LED at 2.0 V and 20 mA, 150 Ω. A green LED at 2.1 V needs 145 Ω, which rounds up to the 150 Ω E24 value. A 3.3 V blue or white LED at 20 mA needs 85 Ω, which rounds up to 91 Ω. The table shows the presets on 5 V and 12 V.
- How do you calculate the resistor for an LED?
- Subtract the LED forward voltage from the supply voltage and divide by the current in amps: R = (Vs − Vf) ÷ I. For 12 V, a 2.0 V LED and 20 mA that is 10 ÷ 0.02 = 500 Ω, and the E24 value at or above it is 510 Ω.
- Why does the calculator pick the next higher resistor value?
- A higher resistance gives a lower current, so rounding up keeps the current at or below your target, before the resistor’s own tolerance. 137 Ω rounds up to 150 Ω and 151 Ω rounds up to 160 Ω. The page shows the current you get: on 9 V a 2.0 V LED at 20 mA needs 350 Ω, which rounds up to 360 Ω and passes 19.4 mA.
- What wattage resistor do I need for an LED?
- The power is (Vs − Vf)² ÷ R for the standard value: 60 mW for 3 V across 150 Ω. The calculator suggests the smallest stocked rating that is at least twice the power at the full target current (I² × R), 1/8 W here. On 12 V the same LED with 510 Ω dissipates 196 mW and the suggestion is 1/2 W. The 2 × margin is this tool’s own rule and the rating steps come from retailer guides, not a datasheet.
- How do I size a resistor for LEDs in series?
- Enter the forward voltage of one LED and the number of LEDs in series; the calculator uses R = (Vs − N × Vf) ÷ I. Two 2.0 V LEDs on 12 V at 20 mA take 4.0 V, so (12 − 4.0) ÷ 0.02 = 400 Ω, which rounds up to 430 Ω, dissipates 149 mW and calls for 1/2 W. Three of them take 6 V and need 300 Ω at 120 mW, a 1/4 W part. Six would take the whole 12 V, and the page says there is no voltage left for a resistor.
- Does it check that the LED can take the current?
- No. The calculator does not know the LED’s maximum current or the resistor’s rating, and it applies no derating for heat. Check both in the datasheets. If the supply voltage is not above the LED forward voltage, it says there is no voltage left for a resistor.
Related Tools
View all toolsResistor Color Code Calculator
Read 4-, 5- and 6-band resistor color codes or SMD codes like 472 as ohms with tolerance, or type 4.7k to get its bands. Brown black red gold is 1 kΩ ±5%.
Ohm's Law Calculator
Enter any two of voltage (V), current (A), resistance (Ω) and power (W) to solve the other two with V = IR and P = VI, shown with SI prefixes.
Voltage Drop Calculator
Voltage drop in volts and percent for copper or aluminum wire, 22 AWG to 1000 kcmil, DC, single- or three-phase, from one-way feet, amps and source volts.
Battery Life Calculator
Battery runtime from mAh, mA and both voltages: 2,500 mAh at 3.7 V into a 500 mA, 5 V load through an 85% converter runs 3 h 9 min, not 5 h.
PCB Trace Width Calculator
PCB trace width from current, copper weight and temperature rise by the IPC-2221 formula, in mils and mm, plus the trace resistance and voltage drop.
Server Rack Power Budget
Add up server and device watts to get the rack load in kW, its heat in BTU per hour, a branch circuit size and the monthly and yearly energy cost.