LED Resistor Calculator
An LED needs a series resistor to limit its current — without one it will draw until it destroys itself. Enter your supply voltage, the LED's forward voltage and forward current, and how many LEDs are in series, and you get the exact resistor, the nearest standard E24 value, and the wattage to choose.
Formula: R = (Vs − n × Vf) ÷ If · Resistor power = If² × R (choose a rating at least double the dissipation)
Worked example: a standard red LED (Vf 2 V, 20 mA) on a 12 V supply: R = (12 − 2) ÷ 0.020 = 500 Ω, nearest E24 value 510 Ω, dissipating about 0.2 W — so a ½ W resistor is the safe choice. Typical forward voltages: red ~2 V, green/yellow ~2.1 V, blue/white ~3.2 V — always check the LED datasheet when you have it.
Working with bare resistors rather than LEDs? Decode any resistor with the resistor color code calculator.
Frequently asked questions
Why can't I connect an LED straight to a battery?
An LED has almost no resistance once it starts conducting, so the current would rise until the LED or the supply fails. The series resistor sets the current to the LED's rated value.
What if the exact resistor value doesn't exist?
Use the nearest standard E24 value — going slightly higher is safer (slightly dimmer LED); going lower pushes more current than rated. For critical brightness, combine two resistors in series.
Why choose double the wattage?
A resistor running at its full rating runs hot and drifts. Doubling the rating keeps it cool and reliable — cheap insurance in any design.