LED Resistor Calculator
Every LED in a DC circuit requires a current-limiting resistor to prevent damage from excess current. An LED behaves as a near-constant voltage drop (its forward voltage, Vf) regardless of supply voltage. Without a resistor, the supply voltage in excess of Vf drives an uncontrolled current through the LED. The formula for the series resistor is R = (Vs - Vf) / If, where Vs is the supply voltage in volts, Vf is the LED forward voltage in volts, and If is the desired forward current in amperes. Typical forward voltages are approximately 2.0 V for red LEDs, 2.2 V for green, and 3.3 V for blue and white. Typical forward current for standard 5 mm LEDs is 20 mA. This calculator computes the exact required resistance, finds the nearest higher value in the E24 standard resistor series (to keep current within rating), and calculates power dissipated in the resistor. Select a resistor wattage rating that comfortably exceeds the calculated dissipation.
LED resistor formula
R = (Vs - Vf) / If
P = (Vs - Vf) × If
Worked example
Vs = 5 V, Vf = 3.3 V (blue LED), If = 20 mA:
- Voltage across resistor = 5 - 3.3 = 1.7 V
- R = 1.7 / 0.02 = 85 Ω
- Nearest E24 higher value = 91 Ω
- Actual current = 1.7 / 91 = 18.7 mA (within rating)
- Power in resistor = 1.7 * 0.02 = 34.00 mW (use 1/8 W or higher)
Common LED forward voltages
| Colour | Typical Vf (V) | Max current (mA) |
|---|---|---|
| Infrared | 1.2 to 1.8 | 100 |
| Red | 1.8 to 2.2 | 20 to 30 |
| Orange / Yellow | 2.0 to 2.3 | 20 |
| Green | 2.0 to 2.4 | 20 |
| Blue | 2.8 to 3.4 | 20 |
| White | 2.8 to 3.5 | 20 |
| UV | 3.0 to 3.6 | 20 |
Always check your LED datasheet for the specific Vf at your operating current.
Frequently asked questions
Why does an LED need a current-limiting resistor?
An LED has a very low dynamic resistance and, without a current-limiting resistor, the current through it is controlled only by the small voltage difference between supply and forward voltage. Even a small voltage excess causes a disproportionate current rise that can quickly destroy the LED. A resistor in series limits the current to the desired safe operating level.
What is LED forward voltage?
Forward voltage (Vf) is the voltage that appears across the LED when it is conducting at its rated current. It depends on the semiconductor material: typically 1.8 to 2.2 V for red and yellow LEDs, 2.0 to 2.4 V for green, 2.8 to 3.4 V for blue and white, and 3.0 to 3.6 V for UV LEDs. Always check the datasheet for the specific Vf at your intended current.
What current should I use for a standard 5 mm LED?
Most 5 mm through-hole LEDs are rated at 20 mA continuous forward current. However, modern high-efficiency LEDs can be quite bright at 5 to 10 mA, which is better for battery-powered applications and reduces resistor power dissipation. Always consult the LED datasheet for the maximum rated current.
What are E24 standard resistor values?
The E24 series is a set of 24 preferred resistor values per decade, evenly spaced on a logarithmic scale. Examples in the 100 ohm decade include 100, 110, 120, 130, 150, 160, 180, 200, 220, 240, 270, 300, 330, 360, 390, 430, 470, 510, 560, 620, 680, 750, 820, and 910 ohms. Using the next higher standard value ensures the LED current does not exceed the calculated design value.
How do I calculate resistor power dissipation for an LED circuit?
Resistor power P = (Vs - Vf) * If, where Vs is supply voltage, Vf is LED forward voltage, and If is the forward current. Choose a resistor rated at least twice this calculated power for a safety margin. For example, if P = 30 mW, use a 1/8 W (125 mW) resistor or larger.
Sources
- IEC 60063:2015: Preferred number series for resistors and capacitors (E24 series definition).
- NIST: SI Units: Electric Current.
Reviewed by the CalculatorHub team, edited by James Graham. 14 June 2026. General information only.