StringMash.com

LED resistor calculator

The resistor to put in series with an LED, its nearest standard value and the power it takes.

12 characters
Updates as you type
Resistor350 Ω
Nearest E12 above390 Ω, giving 17.95 mA
Power in it125.6 mW (a ¼ W part is fine)

Show the steps
  1. The resistor takes whatever voltage the LED doesn't: 9 − 2 = 7 V.
  2. R = V ÷ I = 7 ÷ 0.02 = 350 Ω.
  3. Resistors come in preferred values. The next E12 value up is 390 Ω, which lets slightly less current through: 17.95 mA.
  4. Power in the resistor: I² × R = 125.6 mW. Pick a part rated comfortably above that.
  5. Check the forward voltage and current on the LED's datasheet. Red LEDs are usually around 2 V and blue or white ones around 3 V.

Using the calculator

Type the supply voltage, the LED's forward voltage and the current you want, in that order: `9V, 2V, 20mA`. You get the exact resistance, the nearest standard value above it with the current that gives, and the power the resistor has to handle.

The forward voltage and current are on the LED's datasheet. If you don't have one, red LEDs are usually around 2 V and blue or white around 3 V, and 10 to 20 mA is typical for a small indicator.

Why an LED needs a resistor

An LED doesn't behave like a resistor. Once the voltage across it passes its forward voltage, the current climbs steeply with only a little more voltage, and with nothing to limit it the LED burns out. A resistor in series sets the current.

The resistor takes whatever voltage the LED doesn't. From 9 V with a 2 V LED, the resistor has 7 V across it, and for 20 mA it needs 7 ÷ 0.02 = 350 Ω. Resistors come in standard values, so the calculator picks the next one up in the E12 series, 390 Ω, which lets through about 18 mA. Going up keeps the current below what you asked for.

The first one you could see

Nick Holonyak, working at General Electric's lab near Syracuse, New York, demonstrated the first LED to give off visible light on 9 October 1962. It glowed red, from a crystal of gallium arsenide phosphide he'd grown himself. Other colours came later, and each has its own forward voltage, which is why the datasheet figure matters.

Questions

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

For a red LED at 2 V and 20 mA, (5 − 2) ÷ 0.02 = 150 Ω. Check your LED's datasheet for its real figures.

What if I can't find the exact value?

Use the next standard value up. The current will be a little lower, which is safe. The calculator suggests the E12 value.

Can several LEDs share one resistor?

In series, yes: add up their forward voltages. In parallel it's better to give each LED its own resistor, since small differences between LEDs make one hog the current.

What power rating does the resistor need?

The calculator works it out as I² × R. A ¼ W resistor is fine for most indicator LEDs.

Sources

Added . What's new