LED Resistor Calculator

Enter the supply voltage, the LED forward voltage and the current you want. You get the series resistor, the nearest value you can actually buy, the power it will waste as heat and the colour bands to look for on the bag.

Work it out

How this works

Why an LED needs a resistor

An LED is not a fixed load. Once its forward voltage is reached the current through it climbs very steeply, so connecting one straight across a supply will either dim it or destroy it. A series resistor sets the current and keeps it there.

The resistor goes in series with the LED: supply positive, resistor, LED anode, LED cathode, supply negative. Never wire an LED directly across a battery.

The formula

R = (Vs - Vf) / If, where Vs is the supply voltage, Vf is the LED forward voltage and If is the current you want in amperes.

The power the resistor has to survive is P = (Vs - Vf) x If, which is the same as I x R x I.

Worked example

A red LED on a 9 V battery with a forward voltage of 2.0 V, running at 20 mA: R = (9 - 2) / 0.02 = 350 Ohm.

Resistors are not made in every value, so the next E12 value at or above 350 Ohm is 390 Ohm. With 390 Ohm the LED current is 7 / 390 = 17.9 mA and the resistor dissipates 7 x 0.0179 = 0.126 W, so a quarter watt part is enough. The bands are orange, white, brown, gold.

The store stocks 330 Ohm and 470 Ohm carbon film resistors. A 330 Ohm part gives 21.2 mA, a little over your 20 mA target, and a 470 Ohm part gives 14.9 mA, a little under.

Common mistake

Rounding the resistor down instead of up. A value below the calculated one pushes more current through the LED than the datasheet allows, and LEDs fail early when they are run hot. Round up, then check that the current is still close to what you wanted.

Parts for this

The resistors, the LED and the 9 V supply are what a first LED circuit is built from. Prices and availability are read live when this page is built.

TechCrate volumes that use these parts

Each monthly TechCrate volume arrives with real parts of this kind, so you can try the calculation on a build that arrives in the box.

Next step

ALAI is a member AI assistant and can be wrong. Digital VIP or an active TechCrate subscription is required for member answers. Low voltage hobby electronics only, no mains work.

Other free calculators

All calculators on one page

Free Shipping

On orders over $50

Fast Shipping

Ships within 24 hours

Secure Checkout

256-bit SSL encrypted

Family Owned

Since 2013 in Pine Hill, NJ

Follow us for tutorials, product demos, and maker inspiration!
Added to Cart!