1. Electronics Tools
  2. LED Resistor Calculator

LED Resistor Calculator

Pick your supply, LED colour and current: get the standard resistor, its power rating, and see the LEDs light up.

220Ω
Try
V
mA
LED colour

Typical Vf 1.8–2.2 V, rated 20 mA for a 5 mm LED. Type your datasheet's Vf to override.

Live circuit

330 ΩI9.091 mA+−5 V

Current leaves the + of the supply, the resistor takes the extra volts and the LEDs glow with the real current.

+−

Resistor

330Ω

Exact 300 Ω, rounded up to a standard value.

Where the 5 V goes

2 V
R 3
LED 2 VR 3 V

Results

Current per LED
9.091 mA
Resistor power
27.27 mW · 1/8 W
Power in the LED
18.18 mW
Power reaching the LEDs
40 %

Safe current, enough headroom, a cool resistor: good to solder.

Nearby values you can use

The value just below is brighter, the ones above dimmer. Stay out of red.

  • 270 ΩE12
    11.11 mA33.33 mWBrighter
  • 300 ΩE24
    10 mA30 mWBrighter
  • 330 ΩE12
    9.091 mA27.27 mWRecommended

Step by step

  1. VR

    VR = Vs − Vf

    = 5 V − 2 V = 3 V

  2. R

    R = VR ÷ I

    = 3 V ÷ 10 mA = 300 Ω

  3. E12

    Round up to the next E12 value

    = 300 Ω → 330 Ω

  4. I

    I = VR ÷ R

    = 3 V ÷ 330 Ω = 9.091 mA

  5. P

    P = VR × I

    = 3 V × 9.091 mA = 27.27 mW

    → a 1/8 W resistor is enough (2× margin)

Good to know

One resistor per string

Never share one resistor between LEDs in parallel: the LED with the lowest Vf takes most of the current and burns, then the next one.

Microcontroller pins

An Arduino pin is comfortable at 20 mA (40 mA max, 200 mA for the whole chip). ESP32 pins: keep under 20 mA. More LEDs → use a transistor.

Which leg is which

The long leg is the anode (+), the flat side of the rim and the short leg are the cathode (−). Backwards, it simply stays off.

Vf is a range

Two LEDs of the same colour can differ by 0.3 V. Type the Vf from your datasheet, and keep at least 1 V across the resistor.

Why an LED needs a resistor

An LED is not a lamp: once the voltage passes its forward voltage, its current shoots up with almost no limit. The series resistor takes the voltage that's left over (supply − LEDs) and, by Ohm's law, fixes the current: R = (Vs − n × Vf) ÷ I. Rounding up to a standard value keeps the current at or below your target.

How to choose an LED resistor

How the LED resistor is calculated

R = (Vs − n × Vf) / I

An LED is not a resistor: once its forward voltage Vf is reached, the current rises almost without limit. A series resistor takes the leftover voltage and sets the current. Subtract the LEDs' forward voltages from the supply, then divide by the current you want.

Typical forward voltages at 20 mA: red and orange about 2.0 V, yellow 2.1 V, green 2.2 V (pure green up to 3.2 V), blue 3.0 V, white 3.1 V, UV 3.3 V, infrared 1.3 V. A standard 5 mm LED is rated 20 mA continuous; 10 mA is often bright enough.

The exact result is rarely a value you can buy, so the calculator rounds up to the next E12 value: the LED then runs slightly below the target, never above it. The resistor power is P = U × I, and the suggested rating keeps a 2× margin so the part stays cool.

Worked example: three white LEDs on 12 V

You want to light three white LEDs (Vf ≈ 3.1 V) in series from a 12 V supply at 20 mA.

  1. Voltage left for the resistor12 − 3 × 3.1 = 2.7 V
  2. Exact resistance2.7 V / 0.020 A = 135 Ω
  3. Next E12 value up150 Ω → I = 2.7 / 150 = 18 mA
  4. Power in the resistor2.7 V × 0.018 A ≈ 49 mW → 1/8 W

Use a 150 Ω resistor: the string draws 18 mA and a 1/8 W (or the common 1/4 W) resistor is plenty.

Common mistakes

  • One resistor for several parallel LEDs

    LEDs never have exactly the same Vf: the one with the lowest voltage hogs the current and dies first. Give every parallel string its own resistor.

  • Rounding down instead of up

    Taking 120 Ω instead of 150 Ω in the example above pushes the current to 22.5 mA, above the LED's rating. Round up to stay safe.

  • Leaving no voltage for the resistor

    Four white LEDs need 12.4 V on their own, so a 12 V supply cannot light them. Keep at least 1 V to 2 V across the resistor so the current stays stable when the supply or temperature changes.

  • Using the high-power LED figures for a 5 mm LED

    A 1 W power LED is meant for 350 mA with a heatsink; a standard indicator LED is 20 mA. Check the datasheet of the part you actually have.

LED resistor FAQ

For a red LED (2 V) at 20 mA: (5 − 2) / 0.02 = 150 Ω. For a blue or white LED (3.1 V): (5 − 3.1) / 0.02 = 95 Ω, so 100 Ω. 220 Ω is a safe default that gives about 10 mA to 14 mA.

One red LED at 20 mA: (12 − 2) / 0.02 = 500 Ω, so 560 Ω, dissipating about 0.18 W, which calls for a 1/2 W resistor. Putting several LEDs in series wastes less power in the resistor.

No. The pin would try to drive far more than its 20 mA recommendation and can be damaged along with the LED. A 220 Ω to 330 Ω resistor is the usual choice on 5 V boards, 100 Ω to 220 Ω on 3.3 V boards.

It does not matter: in a series loop the same current flows everywhere. Put it on the anode or cathode side, whichever is easier to wire.

The longer leg is the anode (+). On the body, the flat edge of the rim marks the cathode (−), and inside the LED the cathode is usually the larger piece of metal.

Free shipping

On orders over 5000DA

Easy returns

7-day hassle-free returns

Fast checkout

payments on delivery and fast shipping

24/7 support

We're here to help

Dzduino Online Store

Eempowering engineers, students, makers, researchers, and businesses with high-quality and innovative technical solutions.

  • Sales: store@dzduino.com
  • Store: +213 550 88 88 27
  • Sales: +213 550 88 88 29
  • Support: +213 550 88 88 37
  • 043 Cite Remila (Route du Port), Tigditt - Mostaganem

Shop

  • All Categories
  • Électronique & Développement
  • Tools & Equipements & DIY
  • Téléphonie & Communication
  • Fabrication & Prototyping
  • Computers & Networks
  • Power & Energy & Solar
  • Video Surveillance & Security systems
  • Educational, Scientific and Laboratory

Support

  • Track order
  • Orders
  • Account
  • Shipping & returns
  • Shipping calculator

Company

  • About
  • Contact us
  • Site map
  • Privacy
  • Terms

Stay in the loop

New stock, maker deals, and electronics tips — straight to your inbox.

© 2026 Dzduino Electronics, All Rights Reserved

TermsPrivacyShipping & returnsSite map
CIBBARIDI MobFawriPayCash

Related products

Boards, modules, and kits that pair with this tool.

View all
Resistor 1/4W
DZD0000727072

Resistor 1/4W

FromDZD 5.00In StockIn Stock
LED  3mm,  Red, Green, Yellow, Blue, White
DZD0001352189

LED 3mm, Red, Green, Yellow, Blue, White

DZD 5.00In StockIn Stock
74LSxx TTL Logic
DZD000136246

74LSxx TTL Logic

FromDZD 5.00In StockIn Stock
Electrolytic Capacitor
DZD000137334

Electrolytic Capacitor

FromDZD 5.00In StockIn Stock
Gang socket outlet 16A
DZD0001750

Gang socket outlet 16A

DZD 600.00Out of StockOut of Stock
30*30*25mm Heatsink for TO-220
DZD00020930

30*30*25mm Heatsink for TO-220

DZD 60.00In StockIn Stock
4 X 3 Matrix Keypad
DZD0002174

4 X 3 Matrix Keypad

DZD 900.00In StockIn Stock
Transistors - NPN BC547
DZD000221279

Transistors - NPN BC547

DZD 30.00In StockIn Stock
Free express shipping on orders over 10,000DA
SpecialSaleBlogPrint & CutLabContact usToolsNewLabNew