Need the current-limiting resistor for an LED? Set the supply, color, and current above to get the ohm value, the nearest E12/E24 part, and a wattage. Then open the resistor color code calculator to see the bands. This LED resistor calculator is part of the hardware tools on TechOpt.io.
How this LED resistor calculator applies Ohm’s law
An LED needs a resistor so the leftover voltage does not dump unlimited current through the diode. For LEDs in series (see LED circuit):
R = (Vs − n × Vf) / If
Vs is the supply, n is how many LEDs share the string, Vf is each LED’s forward voltage, and If is the forward current in amperes (20 mA is 0.02 A). A 5 V supply, one 2.0 V red LED, and 20 mA gives (5 − 2) / 0.02 = 150 Ω. Use the datasheet Vf and If when you have them; the color presets are typical values at about 20 mA.
Typical forward voltage by color
Vf depends on the semiconductor, not just the plastic lens. These are common 20 mA ballparks — a modern “green” can be 2.2 V or closer to 3.2 V, so the box on the reel wins.
| Color | Typical Vf |
|---|---|
| Red | 2.0 V |
| Orange | 2.0 V |
| Yellow | 2.1 V |
| Green | 2.2 V |
| Blue | 3.2 V |
| White | 3.2 V |
| IR | 1.5 V |
| UV | 3.4 V |
Why use an E12 or E24 value
You cannot order 136 Ω off the shelf. Through-hole carbon and metal-film parts come in preferred values: E12 (±10%, 12 steps per decade) and E24 (±5%, 24 steps). This calculator snaps to both. The buy value is E24. If the nearest E24 is lower than the exact ohms, current would go above the target, so the next-higher E24 is the safer pick (a bit dimmer, not over-driven).
Power rating
The resistor dissipates P = I²R, which is also the leftover voltage times the current through the resistor. Size the part for at least twice that. A 5 V red LED at 20 mA through 150 Ω dumps 60 mW, so a 1/8 W (125 mW) resistor is enough. 1/4 W is the usual junk-box default and covers most indicator LEDs. A 12 V supply with a single 2 V LED leaves 10 V on the resistor and needs a larger rating.
More than one LED
LED count is how many diodes share one resistor in series. Vs must exceed n × Vf. For LEDs in parallel, leave count at 1 and use that same resistor on each LED. Sharing one resistor across parallel LEDs is a bad habit: Vf varies, so one diode hogs current.
FAQ
How do I calculate the resistor for an LED?
R = (supply voltage − LED count × forward voltage) / LED current, for LEDs in series. A 5 V supply, one 2.0 V red LED, and 20 mA gives (5 − 2) / 0.02 = 150 Ω. Use the datasheet Vf and If when you have them; the color presets are typical values at about 20 mA.
What resistor do I need for a 5 V red LED?
A common 5 mm red LED is about 2.0 V at 20 mA. On a 5 V supply that is 150 Ω, which is an E12 and E24 value. A 1/8 W part is enough (the resistor dissipates 60 mW). Confirm Vf on the datasheet — some red LEDs are closer to 1.8 V or 2.2 V.
Why isn’t the calculated value a standard resistor?
Catalog parts come in E12 (±10%) and E24 (±5%) series, not every ohm value. This calculator snaps to the nearest standard value and, if that part is lower than the exact ohms, points you at the next-higher value so current stays at or under the target.
What wattage resistor should I use?
Power in the resistor is I²R (or current times the leftover voltage). Pick a rating at least twice that, so a 60 mW dissipation uses a 1/8 W (125 mW) part. 1/4 W is the usual junk-box default and covers most indicator LEDs.
Can I run multiple LEDs from one resistor?
Yes, in series: raise the LED count. One resistor feeds the string, R = (Vs − n×Vf) / If, and Vs must exceed n×Vf. For parallel, leave count at 1 and use that same resistor on each LED. Do not share one resistor across parallel diodes — Vf varies, so one LED hogs current.
Does this LED resistor calculator upload my values?
No. It runs entirely in your browser. Voltages, current, and resistor values never leave your machine.
Looking for more calculators? Browse the rest of the tools.