LED Resistor Calculator

Find the right current-limiting resistor for your LED. Don't fry it.

// don't fry your LED — pick the right current-limiting resistor

typical: 10–20 mA for standard LEDs; 1–5 mA for indicators

Exact Resistor
150 Ω
Nearest E24 Standard
150 Ω
Actual Current (with E24)
20.0mA
Resistor Power
60.0mW
▸ show formula
R = (Vsupply − Vf) / I
Vf = LED forward voltage, I = desired current in amps
LEDresistorforward voltagecurrent limiting

About this calculator

An LED is a current-driven device with almost no internal resistance once it is conducting. Connect one straight across a supply and the current runs away until something gives — usually the LED. The fix is a series resistor that drops the leftover voltage and sets the current.

This calculator sizes that resistor. Choose the LED colour (which sets a typical forward voltage), enter the supply voltage and the current you want, and it returns the exact resistance, the nearest standard E24 value, and the power the resistor will dissipate.

How it works

The LED holds a roughly fixed voltage across itself while it conducts — its forward voltage, Vf. Everything left over from the supply appears across the resistor, so the resistor sees Vs − Vf volts.

Apply Ohm's Law to that leftover voltage at the current you want and you have the resistance. Because resistors only come in standard values, the calculator also snaps to the nearest E24 value and recalculates what current you will actually get.

Forward voltage tracks the colour, because it is set by the semiconductor bandgap that produces the light. Red sits near 2.0 V, green and yellow around 2.1 V, and blue, white and UV up at 3.2–3.4 V. Infrared is lowest at about 1.2 V.

R = (Vs − Vf) / I the resistor value
P = (Vs − Vf) × I power in the resistor
P = (Vs − Vf)² / R equivalent form

Worked example

A red LED (Vf = 2.0 V) running at 20 mA from a 5 V Arduino pin.

  1. Voltage across the resistor: 5 − 2.0 = 3.0 V
  2. R = 3.0 / 0.020 = 150 Ω
  3. 150 Ω is already a standard E24 value
  4. P = 3.0 × 0.020 = 0.06 W = 60 mW

Use a 150 Ω resistor. At 60 mW even the smallest ⅛ W part is fine. Bump to 220 Ω if the LED is brighter than you want — LEDs are usually plenty visible at 5–10 mA.

Practical notes

  • Check the datasheet for your actual LED. The colour presets are typical values, and high-brightness parts often run higher than the standard ones.
  • 20 mA is the traditional maximum, not a target. Modern LEDs are bright at 2–10 mA, which is easier on both the LED and the pin driving it.
  • Never drive an LED without a limiter. The forward voltage falls as the die warms, which raises the current, which warms it further — thermal runaway in a few seconds.
  • Wiring LEDs in series lets one resistor set the current for all of them, provided the supply clears the sum of the forward voltages. In parallel, each LED needs its own resistor — small Vf differences make one LED hog the current.
  • Driving from a microcontroller pin, check the per-pin current limit as well. Many parts are happier sinking current than sourcing it.

Frequently asked questions

What resistor do I need for an LED on 5 V?

For a standard red LED at 20 mA, 150 Ω. For blue or white at 20 mA, about 100 Ω. At a gentler 10 mA those become 300 Ω and 180 Ω. The exact value depends on your LED's forward voltage, which is why the calculator asks for the colour.

What happens if the resistor is too big?

Nothing breaks — the LED just runs dimmer because less current flows. That is a perfectly safe direction to err in, and often desirable: a 1 kΩ resistor on a 5 V indicator LED is still clearly visible and draws only a few milliamps.

Can I use one resistor for several LEDs?

Only if they are in series, where the same current necessarily flows through all of them. Add the forward voltages together and make sure your supply exceeds the total. In parallel, give each LED its own resistor.

What is LED forward voltage?

The voltage an LED drops while conducting, set by its semiconductor material and therefore by its colour. It barely changes with current, which is why an LED cannot limit its own current and needs a resistor to do it.

Do I put the resistor before or after the LED?

Either — it is a series circuit, so the same current flows through both regardless of order. Convention puts it on the anode side, but electrically it makes no difference.