LED Resistor Calculator: an overview
This LED resistor calculator is a tool for determining which resistor you should use when building electronic circuits with LEDs. Thanks to these calculations, you can be sure that you won't damage the diodes with an excessive current. The calculator finds both the required resistance and the power dissipation in a single LED, in all LEDs, and in the resistor.
LEDs, or light-emitting diodes, are small electronic components. When current is applied to an LED, it emits light in various colors, such as red, green, or blue. If the current passing through the diode is too high, it will damage the LED. To limit the current, it's common practice to add a current-limiting resistor in series with the diode. This method is simple and solves many problems in a basic circuit, but you shouldn't apply it to high-current LEDs.
What do you need to know?
To size an LED resistor you need three values, plus the way the LEDs are wired:
- Supply voltage (VS) — the voltage of your power source (e.g., a 5 V USB rail, a 9 V battery, or a 12 V car circuit).
- LED forward voltage (VF) — the voltage that drops across the diode. It depends on color: ~1.8–2.2 V for red, ~2.0–3.0 V for green/yellow, and ~3.0–3.4 V for blue/white. Check the datasheet.
- LED forward current (IF) — the current you want flowing through the diode. A typical indicator LED runs at 20 mA.
- Number of LEDs and configuration — a single LED, several LEDs in series, or several LEDs in parallel.
The LED resistor formula
The resistor value comes straight from Ohm's law applied to the voltage left over after the LEDs:
Where:
- R — required series resistance, in ohms (Ω)
- VS — supply voltage (V)
- VLED — total forward voltage of the LED(s) in the string (V)
- IF — forward current through the LED (A)
The power dissipated by the resistor is PR = (VS − VLED) × IF = IF² × R. Each LED dissipates PLED = VF × IF. Always choose a resistor with a power rating at least twice the calculated dissipation.
LEDs in series
When LEDs are wired in series, the same current flows through all of them, and their forward voltages add up. A single resistor protects the whole string:
Here n is the number of LEDs. The supply voltage must be greater than the combined forward voltage (n × VF); otherwise the LEDs won't light. Series wiring is efficient because only one resistor is needed and every LED draws the same current.
Example: Three red LEDs (VF = 2 V, IF = 20 mA) on a 12 V supply:
PR = 6 × 0.02 = 120 mW → use a ¼ W resistor
LEDs in parallel
When LEDs are wired in parallel, each branch sees the full supply voltage, so the safest approach is to give every LED its own resistor. Each resistor is sized for a single LED:
The total current drawn from the supply is n × IF. Avoid using a single shared resistor for parallel LEDs: small differences in forward voltage cause one LED to hog the current, leading to uneven brightness and premature failure.
Unit systems: American and metric
Electrical quantities are part of the International System of Units (SI) and are identical in American engineering and metric practice — volts (V), amperes (A) and ohms (Ω) mean the same thing everywhere. To make data entry easy, this calculator lets you enter the LED current in milliamperes (mA) or amperes (A), and it automatically scales the results to the most readable prefix:
- Resistance — Ω, kΩ (1,000 Ω) or MΩ (1,000,000 Ω)
- Power — mW (milliwatts) or W (watts)
- Current — mA (milliamperes) or A (amperes)
The calculator also suggests the nearest higher standard E12 resistor value and a recommended resistor power rating, so you can pick a real part with confidence.
Frequently Asked Questions
What resistor do I need for a single LED on 5 V?
For a typical red LED (VF = 2 V, IF = 20 mA) on a 5 V supply: R = (5 − 2) / 0.02 = 150 Ω. The resistor dissipates 3 V × 0.02 A = 60 mW, so a standard ⅛ W or ¼ W resistor is fine.
What happens if I use too small a resistor?
A smaller resistor allows more current to flow. Exceeding the LED's rated forward current overheats the junction and shortens its life or destroys it instantly. When in doubt, choose the next higher standard resistor value — the LED will simply be slightly dimmer but far safer.
Why is a resistor needed at all?
An LED is a diode: above its forward voltage, its current rises almost vertically with voltage. Without a current-limiting resistor, even a tiny voltage increase causes a runaway current that burns out the LED. The resistor absorbs the excess voltage and fixes the current at a safe value.
Can I connect LEDs in parallel with one resistor?
It's not recommended. LEDs in parallel rarely have identical forward voltages, so one diode draws more current than the others, glows brighter, heats up, and fails first — then the remaining LEDs get even more current. Use a separate resistor for each LED, which is exactly what this calculator computes in parallel mode.
How do I choose the resistor's power rating?
Calculate the resistor's dissipation (P = I² × R) and pick a part rated for at least twice that value. This calculator does it for you and recommends a standard rating (⅛ W, ¼ W, ½ W, 1 W, etc.).