LED Resistor Calculator
Enter your supply voltage, LED forward voltage, and target current to find the right resistor. Shows the exact value, the nearest standard (E24) size, power dissipation, colour bands, and a circuit diagram. Nothing uploaded.
Resistor Values
Full power details
Resistor Colour Bands (4-band) ?
Circuit Schematic
Learn more: sizing an LED resistor
The formula and why color matters
The resistor takes whatever voltage is left after the LED. As Adafruit's guide to LED forward voltage shows, you subtract the LED's forward voltage from the supply and divide by the current you want. Its example is a 9V battery and a 2.2V LED, where (9 - 2.2) / 1000 gives 6.8 mA.
The same guide gives about 2.2V for red, yellow, orange and light-green LEDs. The tool's presets are about 2V for red and about 3.2V for blue and white. Forward voltage varies by part, so use the data sheet value when you have it.
On a 9V supply at 20 mA, a red LED at 2.0V needs (9 - 2.0) / 0.02 = 350 ohms, which the tool rounds to the standard E24 value of 360 ohms. A blue LED at 3.2V needs (9 - 3.2) / 0.02 = 290 ohms, which rounds to 300 ohms.
Swapping resistors between the two shows the effect. The 360 ohm resistor on the blue LED gives 5.8 / 360 = 16 mA, so it is dimmer. The 300 ohm resistor on the red LED gives 7 / 300 = 23 mA, which is above the 20 mA target but under the tool's 30 mA warning.
E24 rounding and the 30 mA warning
Exact values are seldom for sale, so the tool picks the nearest E24 value and recalculates the real current. Nearest can be either side of the exact value. For 5V, a 3.3V LED and 20 mA, the exact figure is 85 ohms and the nearest E24 value is 82 ohms, which gives 20.7 mA. The tool warns if the real current goes above 30 mA.
Adafruit says the optimal current for 99% of LEDs is 20 mA and that 30 mA may be acceptable for extra brightness. SparkFun's LED tutorial describes an example LED that shines brightest at 20 mA, with a peak rating of 30 mA for short bursts that you should not sustain. Check your LED's data sheet for its own limits.
FAQ
What happens if the resistor is too small?
The current rises above the LED's rating. Adafruit warns that too much current makes an LED fail, and it also drains a battery faster.
Can one resistor drive LEDs in series?
Yes, if the supply is higher than the forward voltages added together. The tool multiplies the forward voltage by the number of LEDs. Three red LEDs at 2.0V need 6V, so a 9V supply leaves 3V for the resistor, and at 20 mA that is 150 ohms.
Does the resistor's wattage matter?
Yes. The resistor dissipates its voltage drop times the current. The tool shows this in milliwatts. On 9V with a red LED it is 7V x 19.4 mA, about 136 mW. On a 24V supply with the same LED, 22V at 20 mA is 440 mW, which is more than a 1/4 W resistor should carry.