LED Resistor Calculator
Calculate the correct current-limiting resistor value for LEDs in series. Enter supply voltage, LED forward voltage, desired current, and number of LEDs to get the required resistance and power rating. See also our Ohm's Law Calculator and Resistor Color Code Calculator.
How to Calculate LED Resistor Value
LEDs (Light Emitting Diodes) require a current-limiting resistor to prevent them from drawing excessive current and burning out. Unlike incandescent bulbs, LEDs have a very steep current-voltage characteristic — a small increase in voltage above the forward voltage causes a dramatic increase in current. The resistor drops the excess voltage and limits the current to a safe value specified in the LED datasheet.
To calculate the resistor value, subtract the total LED forward voltage drop from the supply voltage, then divide by the desired LED current. For multiple LEDs in series, multiply the forward voltage by the number of LEDs. The supply voltage must always be greater than the total forward voltage drop, otherwise the LEDs will not light up. Always choose the next higher standard resistor value to ensure the current stays at or below the rated maximum.
The power dissipated in the resistor equals the voltage across it multiplied by the current through it. Choose a resistor with a power rating at least twice the calculated dissipation for reliability. Standard 1/4W (250mW) resistors are adequate for most single-LED circuits at 20mA, but high-power LED applications may require 1/2W or 1W resistors.
LED Resistor Formula
Basic Formula:
R = (Vs - n × Vf) / If
Where:
R = resistance in ohms (Ω)
Vs = supply voltage (V)
n = number of LEDs in series
Vf = forward voltage per LED (V)
If = forward current (A)
Power Dissipation:
P_resistor = (Vs - n × Vf) × If
P_resistor = If² × R
Maximum LEDs in Series:
n_max = floor((Vs - 2) / Vf)
(leaving at least 2V for the resistor)
Example Calculation
You want to connect a red LED (Vf = 2.0V, If = 20mA) to a 12V power supply:
Given: Vs = 12V, Vf = 2.0V, If = 20mA = 0.020A, n = 1
R = (12 - 1×2.0) / 0.020 = 10 / 0.020 = 500 Ω
Nearest standard (E24): 510 Ω
Actual current with 510Ω: I = 10/510 = 19.6 mA
Power: P = 10 × 0.0196 = 196 mW (use 1/4W resistor)
For 3 LEDs in series:
R = (12 - 3×2.0) / 0.020 = 6 / 0.020 = 300 Ω
Power: P = 6 × 0.020 = 120 mW (1/4W resistor OK)
LED Forward Voltage Reference Table
| Supply (V) | Vf (V) | Current (mA) | LEDs | Resistor (Ω) |
|---|---|---|---|---|
| 3.3 V | 2.0 V | 20 mA | 1 | 65 Ω |
| 5 V | 2.0 V | 20 mA | 1 | 150 Ω |
| 5 V | 3.2 V | 20 mA | 1 | 90 Ω |
| 9 V | 2.0 V | 20 mA | 1 | 350 Ω |
| 9 V | 2.0 V | 20 mA | 3 | 150 Ω |
| 12 V | 2.0 V | 20 mA | 1 | 500 Ω |
| 12 V | 2.0 V | 20 mA | 3 | 300 Ω |
| 12 V | 2.0 V | 20 mA | 5 | 100 Ω |
| 12 V | 3.2 V | 20 mA | 1 | 440 Ω |
| 12 V | 3.2 V | 20 mA | 3 | 120 Ω |
| 24 V | 2.0 V | 20 mA | 5 | 700 Ω |
| 24 V | 2.0 V | 20 mA | 10 | 200 Ω |
Frequently Asked Questions
Why do LEDs need a current-limiting resistor?
LEDs are current-driven devices with very low dynamic resistance once they reach their forward voltage. Without a resistor, even a small voltage increase above Vf causes current to spike exponentially, destroying the LED within milliseconds. The resistor provides a linear voltage-to-current relationship that stabilizes the operating point and protects the LED from overcurrent.
What is the typical forward voltage for different LED colors?
Red LEDs: 1.8-2.2V, Orange: 2.0-2.2V, Yellow: 2.0-2.4V, Green: 2.0-3.5V, Blue: 3.0-3.5V, White: 3.0-3.5V, UV: 3.3-4.0V, Infrared: 1.2-1.6V. These values vary by manufacturer and specific LED type — always check the datasheet for exact values. High-brightness LEDs may have slightly different forward voltages than standard indicator LEDs.
Can I connect LEDs in parallel without individual resistors?
No. LEDs in parallel should each have their own current-limiting resistor. Due to manufacturing variations, parallel LEDs have slightly different forward voltages. The LED with the lowest Vf will hog most of the current, potentially burning out while others remain dim. Individual resistors ensure each LED gets the correct current regardless of Vf variations.
How many LEDs can I connect in series?
The maximum number is limited by your supply voltage. The total forward voltage (n × Vf) must be less than the supply voltage, leaving enough headroom for the resistor (at least 1-2V). For example, with 12V supply and 2V LEDs: max = floor((12-2)/2) = 5 LEDs. With less headroom, the circuit becomes sensitive to voltage variations.
What power rating should the resistor have?
Calculate the power dissipation (P = V_resistor × I) and choose a resistor rated for at least twice that value. For a single 20mA LED on 12V: P = 10V × 0.02A = 200mW, so a 1/2W resistor provides adequate margin. Standard 1/4W resistors work for most single-LED circuits but check the math for high-current or multi-LED configurations.
Should I use the exact calculated value or the nearest standard?
Always use the nearest standard value that is equal to or greater than the calculated value. A slightly higher resistance means slightly less current, which is safer for the LED. For example, if you calculate 333Ω, use 330Ω (slightly brighter, slightly over-driven) or 360Ω (slightly dimmer, safer). For critical applications, use 360Ω; for maximum brightness within spec, 330Ω is acceptable.
LED Color and Forward Voltage Guide
The forward voltage of an LED is determined by the semiconductor material and the wavelength of light it emits. Shorter wavelengths (blue, UV) require higher energy photons and thus higher forward voltages. Red and infrared LEDs use gallium arsenide (GaAs) or aluminum gallium arsenide (AlGaAs) with Vf around 1.8-2.2V. Green and blue LEDs use indium gallium nitride (InGaN) with Vf around 3.0-3.5V. White LEDs are actually blue LEDs with a phosphor coating and share similar forward voltages.
Series vs Parallel LED Configurations
Series connections are preferred when possible because all LEDs share the same current, ensuring uniform brightness. The limitation is that the supply voltage must exceed the sum of all forward voltages. Parallel connections allow more LEDs with lower supply voltages but require individual resistors for each LED or string. For large LED arrays, a combination of series strings in parallel (each string with its own resistor) provides the best balance of efficiency and uniformity.