Electrical
LED Resistor Calculator
Calculate the series resistor, LED current, and resistor power for one or more LEDs on a DC voltage supply.
This LED Resistor Calculator sizes the current-limiting resistor for a simple DC LED string. Enter the supply voltage, LED forward voltage, number of identical LEDs in series, and target current to calculate the ideal resistor, nearest higher E12 value, resistor power, LED power, and expected current. You can also check the current produced by a resistor you already have. The calculator is intended for simple indicator LEDs, breadboard circuits, and low-voltage electronics, not constant-current LED drivers or parallel LED strings.
V_s · DC source voltage feeding the LED string and resistor.
V_f · Voltage drop of one LED at the intended current, preferably from the LED datasheet.
n · Number of identical LEDs connected in one series path.
I · Current through the series string. The same current flows through every LED and the resistor.
V_driver · Optional extra drop from a transistor, diode, or current-sink output.
Use one resistor per series LED string. For parallel LEDs, use separate resistors per branch or a proper LED driver.
Solution
Enter the LED string values to calculate the resistor or current.
R = (V_s − nV_f − V_driver) / I
Formula Sheet
- V_sSupply Voltage
- V_fLED Forward Voltage
- nLEDs in Series
- ILED Current
- RSeries Resistor
- P_RResistor Power
- P_totalSupply Power
Variables & Units
| Symbol | Variable | Description | Common Units |
|---|---|---|---|
| V_s | Supply Voltage | DC source voltage feeding the LED string and resistor. | V |
| V_f | LED Forward Voltage | Voltage drop of one LED at the intended current, preferably from the LED datasheet. | V |
| n | LEDs in Series | Number of identical LEDs connected in one series path. | |
| I | LED Current | Current through the series string. The same current flows through every LED and the resistor. | mA, A |
| R | Series Resistor | Current-limiting resistor placed in series with the LED string. | Ω, kΩ |
| P_R | Resistor Power | Heat dissipated in the resistor at the calculated current. | mW, W |
| P_total | Supply Power | Total DC power drawn from the supply by the modeled series path, including any entered driver or switch drop. | mW, W |
How to Use This Calculator
- 01Choose Required Resistor when you know the target LED current and need the series resistor value.
- 02Choose Check Current when you already have a resistor and want to estimate the LED current it will produce.
- 03Enter supply voltage, forward voltage per LED, and the number of identical LEDs in one series string.
- 04Use the LED datasheet forward voltage at the intended current when possible. Color-based typical values are only rough estimates.
- 05Check resistor power dissipation and choose a resistor wattage comfortably above the calculated value; 2x calculated power is a common minimum margin for small hobby circuits.
- 06If a microcontroller pin drives the LED directly, confirm the pin current and total chip current limits separately. The resistor protects the LED; it does not raise the pin rating.
How the Formula Works
A basic LED string uses Kirchhoff's voltage law: the supply voltage is split between the LED forward-voltage drops, any driver or switch drop, and the series resistor. The resistor voltage is V_R = V_s − nV_f − V_driver.
In Required Resistor mode, Ohm's law gives R = V_R / I. In Check Current mode, the same equation is rearranged to I = V_R / R.
The resistor turns electrical energy into heat, so power is P_R = V_R × I, equivalent to I²R. The calculator also estimates LED power as P_LED = nV_f × I.
Worked Example 01
Red LED from a 5 V supply
Known
- Supply voltage: 5 V
- Forward voltage: 2.0 V
- LEDs in series: 1
- Target current: 20 mA
Formula
R = (V_s − nV_f − V_driver) / I
Substitution
R = (5 − 1 × 2.0) / 0.020
Result
R = 150 Ω; resistor power = 0.06 W
The resistor drops 3 V at 20 mA. A 150 Ω resistor is an exact E12 value, and a common 1/4 W resistor has comfortable margin for 60 mW.
Worked Example 02
Three red LEDs from a 12 V supply
Known
- Supply voltage: 12 V
- Forward voltage per LED: 2.1 V
- LEDs in series: 3
- Target current: 20 mA
Formula
R = (V_s − nV_f − V_driver) / I
Substitution
R = (12 − 3 × 2.1) / 0.020
Result
R = 285 Ω; next higher E12 value = 330 Ω
The ideal resistor is 285 Ω. Choosing the next higher common value reduces current to about 17.3 mA, which is usually safer than choosing a lower value.
Worked Example 03
Check current with a 330 Ω resistor
Known
- Supply voltage: 9 V
- Forward voltage: 2.0 V
- LEDs in series: 1
- Series resistor: 330 Ω
Formula
I = (V_s − nV_f − V_driver) / R
Substitution
I = (9 − 1 × 2.0) / 330
Result
I ≈ 21.2 mA; resistor power ≈ 0.148 W
This is slightly above a typical 20 mA design current and dissipates about 0.15 W in the resistor, so a 1/4 W resistor is a more sensible choice than 1/8 W.
Applications
- 01Choosing a resistor for a 5 V Arduino or Raspberry Pi indicator LED
- 02Sizing a current-limiting resistor for one or more LEDs in series from a DC supply
- 03Checking whether a resistor from a parts bin drives an LED at a safe current
- 04Estimating resistor wattage before selecting a 1/8 W, 1/4 W, 1/2 W, or larger resistor
Assumptions
- 01The circuit is one DC series path with one current-limiting resistor.
- 02All LEDs in the string are treated as identical and use the entered forward voltage.
- 03Forward voltage is treated as a fixed design value at the selected current, even though real LEDs vary with current, temperature, and manufacturing tolerance.
Where This Model Stops
- 01Does not model parallel LED branches, LED strips, constant-current drivers, PWM peak-current limits, thermal derating, or supply/resistor tolerance worst cases.
- 02Not for mains-powered LED lamps or high-power LED arrays without proper driver, thermal, and safety design.
- 03Not for addressable LED strips, multiplexed LED matrices, or automotive/industrial supplies with large voltage transients unless extra driver and protection design is included.
- 04Datasheet maximum current, package power, board temperature, and brightness requirements must be checked separately.
References
- [1]LED Series Resistor Calculator
DigiKey
Industry reference for calculating LED series resistance from supply voltage, forward voltage, and forward current, including resistor power guidance.
- [2]Choosing the correct resistor for your LED
DigiKey TechForum
Explains the LED current-limiting relation R = (Vs − Vf) / If and the need to calculate resistor wattage.
Frequently Asked Questions
What resistor do I need for an LED?
Use R = (V_s − nV_f) / I for a simple DC series LED circuit. Subtract the total LED forward voltage from the supply voltage, then divide by the desired LED current in amperes.
Should I choose the exact resistor value or the next higher standard value?
For simple indicator LEDs, choosing the next higher standard resistor is usually safer because it reduces current slightly. After choosing it, check whether the LED is still bright enough and whether the resistor power rating has enough margin.
Can I connect LEDs in parallel with one resistor?
That is not recommended for reliable current sharing. This calculator assumes one series LED string. If you need parallel LEDs, use separate current-limiting resistors for each branch or a proper LED driver.
Why does forward voltage matter?
The resistor only drops the voltage left after the LEDs. A higher total forward voltage leaves less voltage across the resistor, so the same resistor produces less current. Forward voltage also changes with LED part number, current, and temperature.
What LED current should I use?
Use the LED datasheet value when available. Small indicator LEDs are often designed around 5-20 mA, but many modern LEDs are bright at lower currents, which reduces heat and battery drain.