Calculate current-limiting resistor value, nearest E-series resistor, and resistor power rating for single LEDs or LED strings in series.
โก Field Tip: Choose the nearest standard resistor value above the exact value when possible. A slightly higher resistor lowers LED current and is usually safer for long-term reliability.
๐ Basic LED Current-Limiting Circuit
Presets:
Supply Voltage โ Vs
Battery, power supply or GPIO voltage
LED Forward Voltage โ Vf
Use datasheet value; typical 1.8โ3.5 V
LED Forward Current โ If
Standard indicator LEDs commonly use 20 mA
LEDs in Series โ qty
LEDs wired end-to-end in one string
Nearest standard value:
โ ๏ธ
Exact Resistor Value
โ
Minimum Power Rating
โ
Use next standard rating above this
Nearest Standard Resistor
โ
R = (Vs โ nรVf) / If
๐ Formula Used
R = (Vs โ n ร Vf) / If P = (Vs โ n ร Vf) ร If
๐ Quick LED Reference
Common LED Current
Indicator LED10โ20 mA
Low-power status LED2โ5 mA
High-power LED350 mA+
Typical Forward Voltage
Red / IR1.2โ2.2 V
Yellow / Green2.0โ3.2 V
Blue / White3.0โ3.5 V
Design Checks
Use next higher RSafer
Power margin2ร
Parallel LEDsSeparate R
๐ง Engineering Notes
GPIO pins need extra care Arduino, ESP32 and Raspberry Pi pins have current limits. The resistor protects both the LED and the output pin.
Series LED strings Add forward voltages together. The supply voltage must be higher than the total LED voltage to leave room for the resistor.
Resistor heat matters A resistor may calculate correctly but still run hot if wattage is too low. Use the next higher power rating with margin.
LED brightness is not linear Reducing current from 20 mA to 10 mA often still gives usable brightness while improving LED life and efficiency.
๐ Why does an LED need a resistor?
An LED is a non-linear device. It does not naturally limit current like a resistor. If it is connected directly across a power supply, current can rise quickly and damage the LED. A series resistor limits the current to a safe value.
The resistor drops the leftover voltage after the LED forward voltage is subtracted from the supply voltage.
๐ก Common LED forward voltages
Forward voltage depends on LED colour and semiconductor type. Always use the datasheet value when accuracy matters.
LED Type
Typical Vf
Typical If
Common Use
Red
1.8โ2.2 V
20 mA
Panel indicators
Orange / Yellow
2.0โ2.2 V
20 mA
Indicators, displays
Green
2.0โ3.5 V
20 mA
Indicators, signage
Blue / White
3.0โ3.5 V
20 mA
RGB, backlight, lighting
IR
1.2โ1.8 V
10โ100 mA
Remote controls, sensors
High-power white
3.0โ3.6 V
350 mAโ1 A
Flashlights, lamps
โก Practical design tips
Use a higher resistor if unsure: A higher resistor gives slightly lower LED current, which is normally safer.
Check resistor wattage: Use a power rating comfortably above the calculated dissipation. A 2ร margin is a good practical rule.
Parallel LEDs need separate resistors: Do not run multiple parallel LEDs from a single shared resistor unless the design is specifically current-balanced.
โ Frequently Asked Questions
Use R = (Vs โ nรVf) / If. Vs is supply voltage, Vf is the LED forward voltage, n is the number of LEDs in series, and If is LED current in amps.
Choose the nearest higher standard resistor when possible. It slightly lowers LED current and is usually safer for the LED and driver output.
It is not recommended for normal designs. Small forward-voltage differences can make one LED take more current. Use one resistor per parallel branch.
Use a power rating above the calculated dissipation. A 2ร margin is a practical rule, especially inside enclosures or warm environments.
No. Many indicator LEDs work well at 2โ10 mA, and high-power LEDs may need hundreds of milliamps with proper drivers and heat sinking. Check the datasheet.