Using the calculator
Type the supply voltage, the LED's forward voltage and the current you want, such as 9V, 2V, 20mA. The two voltages can go in either order. The larger one is taken as the supply. 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 colors 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, then suggests the smallest common rating (¼ W, ½ W, 1 W, 2 W and up) that runs at no more than 60% of its rating, since a resistor near its limit runs hot. A ¼ W part is fine for most indicator LEDs at 20 mA. A high-power LED at hundreds of milliamps can need several watts, and then a constant-current driver wastes far less than a resistor.
Sources
- Wikipedia: Nick Holonyak
- Wikipedia: E series of preferred numbers
- IEC 60063:2015, Preferred number series for resistors and capacitors (IEC webstore)
Added . Last updated and reviewed . What's new






