LED Light Resistor Calculator

LED Light Resistor Calculator

Popular AI Skill PRO

Enter Calculation

Formula

R=Supply Voltage (V)−Forward Voltage (V)Forward Current (mA)1000R = \frac{\text{Supply Voltage (V)} - \text{Forward Voltage (V)}}{\dfrac{\text{Forward Current (mA)}}{1000}}

Example

R=5−2201000=150R = \frac{5 - 2}{\dfrac{20}{1000}} = 150
Show calculation steps (1)
  1. Resistor Power Dissipation

    P=R·(Forward Current (mA)1000)2P = R \cdot \left(\frac{\text{Forward Current (mA)}}{1000}\right)^{2}

    P in watts; R is the series resistor value above and forward current is converted from mA to A

Usage stats

Advertisement

Results

Required Resistance
150 Ω
Supply Voltage
5 V
Forward Voltage
2 V
Forward Current
20 mA
Power Dissipation
0.06 W

Report an error on this page

What the LED Resistor Calculator Does

An LED needs a current-limiting resistor in series with it. Without one, an LED connected directly across a power source draws too much current and burns out almost instantly. This calculator works out the correct resistor value to place in series with your LED so it runs safely at its rated current. It also tells you how much power that resistor will dissipate, so you can choose one with an adequate wattage rating. The physics here is universal — Ohm's law applies the same way everywhere — so this tool is not country-specific.

Series circuit with battery, resistor R, and LED in a loop
An LED in series with a current-limiting resistor across a supply voltage.

The Three Inputs

  • Supply Voltage (V) – the voltage of the power source driving the circuit, for example 5 V from a USB rail, 9 V from a battery, or 12 V from a car system.
  • LED Forward Voltage (V) – the voltage dropped across the LED when it is lit. This depends on the LED colour: roughly 1.8–2.2 V for red, 3.0–3.4 V for blue/white. Check the datasheet for an exact figure.
  • LED Forward Current (mA) – the target operating current, often around 20 mA for standard 5 mm LEDs.

The Formula

The calculator applies Ohm's law. The resistor must drop the difference between the supply voltage and the LED's forward voltage, while passing the chosen current:

  • Resistance (Ω) = (Supply Voltage − Forward Voltage) ÷ (Forward Current ÷ 1000)
  • Power (W) = Resistance × (Forward Current ÷ 1000)²
$$R = \frac{\text{Supply Voltage (V)} - \text{Forward Voltage (V)}}{\dfrac{\text{Forward Current (mA)}}{1000}}$$ $$P = R \cdot \left(\frac{\text{Forward Current (mA)}}{1000}\right)^{2}$$

The current is divided by 1000 to convert milliamps to amps before the calculation.

Advertisement
Supply voltage split into resistor voltage drop and LED forward voltage
The supply voltage divides between the resistor's drop and the LED's forward voltage.

Worked Example

Suppose you have a 9 V battery, a red LED with a 2 V forward voltage, and you want 20 mA through it.

  • Resistance = \((9 - 2) \div (20 \div 1000) = 7 \div 0.02 =\) 350 Ω
  • Power = \(350 \times (0.02)^{2} = 350 \times 0.0004 =\) 0.14 W

Since 350 Ω isn't a standard value, pick the next common size up (such as 360 Ω or 390 Ω) to stay safe. A standard 0.25 W (¼ watt) resistor comfortably handles the 0.14 W dissipation.

Typical LED Forward Voltages and Currents by Colour

The forward voltage \(V_f\) of an LED depends mainly on the semiconductor material, which sets the colour. The values below are typical ranges at about 20 mA for common 3 mm and 5 mm LEDs. They are for orientation only. Always use the figures from your LED's datasheet, because \(V_f\) varies between manufacturers, batches, temperature and current.

LED colour Typical forward voltage at 20 mA (V) Typical forward current
Infrared (850–940 nm) 1.2 – 1.7 20 mA typical (some parts allow more; check the datasheet)
Red 1.8 – 2.2 10–20 mA
Orange 2.0 – 2.2 10–20 mA
Yellow 2.0 – 2.2 10–20 mA
Green 2.0 – 2.4 (traditional), 2.8 – 3.4 (bright InGaN types) 10–20 mA
Blue 2.8 – 3.4 10–20 mA
White 2.8 – 3.4 10–20 mA
Ultraviolet (UV) 3.1 – 4.0 20 mA typical
  • Low-current LEDs: designed for about 2 mA, with good brightness for indicators.
  • Standard LEDs: usually driven at 10–20 mA for a good balance of brightness and lifetime.
  • Absolute maximum: often around 25–30 mA continuous for a standard 5 mm LED. Design below this limit, not at it.

Driving an LED at a lower current than its rating is safe and extends its life; the light output simply drops.

Standard Resistor Values (E12 / E24 Series)

Resistors are sold in preferred-number series defined by the IEC 60063 standard. The calculated value rarely matches exactly, so pick a standard value. For an LED, round up to the next standard value so the current stays at or below the target.

Series Base values (multiply by 1, 10, 100, 1 k, 10 k, 100 k …)
E12 (10 % tolerance steps) 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82
E24 additions (5 % tolerance steps) 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75, 91

E24 contains all E12 values plus the additions above. Example decades of the E12 series: 100, 120, 150, 180, 220, 270, 330, 390, 470, 560, 680, 820 Ω, then 1 kΩ, 1.2 kΩ, 1.5 kΩ and so on.

Common power ratings

Rating Power (mW) Typical use
1/8 W 125 Small signal circuits, compact boards
1/4 W 250 The most common through-hole size
1/2 W 500 Higher supply voltages, more headroom
1 W 1000 High dissipation, several LEDs in series with one resistor

The resistor dissipates \(P = (V_s - V_f) \times I\). As a guideline, choose a power rating at least about 2× the calculated dissipation. This keeps the resistor cooler and more reliable. For example, 60 mW of dissipation points to a 1/4 W resistor (1/8 W is only about 2× and runs warm).

Advertisement

Resistor Values for Common Supply Voltages and LED Colours

All rows use \(I = 20\) mA, so \(R = \dfrac{V_s - V_f}{0.020}\) and the dissipation at 20 mA is \(P = (V_s - V_f) \times 0.020\). Assumed forward voltages: red 2.0 V, green 2.2 V, blue/white 3.2 V. The E12 column shows the next standard value at or above the calculated resistance. Because that value is slightly higher, the real current is a little under 20 mA and the real dissipation a little lower than shown.

Supply LED colour (Vf) Calculated R (Ω) E12 value, rounded up Dissipation at 20 mA (mW)
3.3 V Red (2.0 V) 65 68 Ω 26
3.3 V Green (2.2 V) 55 56 Ω 22
3.3 V Blue/white (3.2 V) 5 Unsuitable: supply too close to Vf, so the current is unstable –
5 V Red (2.0 V) 150 150 Ω 60
5 V Green (2.2 V) 140 150 Ω 56
5 V Blue/white (3.2 V) 90 100 Ω 36
9 V Red (2.0 V) 350 390 Ω 140
9 V Green (2.2 V) 340 390 Ω 136
9 V Blue/white (3.2 V) 290 330 Ω 116
12 V Red (2.0 V) 500 560 Ω 200
12 V Green (2.2 V) 490 560 Ω 196
12 V Blue/white (3.2 V) 440 470 Ω 176

Notes:

  • A 3.3 V supply with a 3.2 V blue or white LED leaves only 0.1 V across the resistor. A tiny change in \(V_f\) (temperature, batch) changes the current a lot, and if \(V_f\) is above the supply the LED will not light properly. Use a higher supply or a boost/constant-current driver instead.
  • At 9 V and 12 V the dissipation is 116–200 mW. A 1/4 W resistor is the minimum, and a 1/2 W resistor is better for the 12 V rows, following the roughly 2× guideline.
  • Several LEDs in series share the supply: subtract the sum of their forward voltages from \(V_s\) before calculating.
  • These are example values with typical \(V_f\); recalculate with your LED's datasheet figures.

Frequently Asked Questions

Why round up to the next resistor value? Choosing a slightly higher resistance lowers the current marginally, which protects the LED. Rounding down could push current above the rated limit.

What if supply voltage is below the forward voltage? The result would be negative or zero, meaning the LED won't light. You need a supply voltage higher than the LED's forward voltage.

Why does the power rating matter? A resistor dissipates energy as heat. If the calculated power exceeds the resistor's rating, it overheats and may fail. Always pick a resistor rated above the calculated wattage.

Last updated:

Most popular in Physics and Engineering

View all Physics and Engineering calculators