LED Resistor Calculator
Enter your supply voltage, the LED forward voltage and the current you want. You get the exact resistor, the nearest standard value above it, and the real current and power with that part.
Updated
Report a problem
Formula
R = (Vs − n × Vf) ÷ I
Vssupply voltage,Vfforward voltage of one LED,nLEDs in series,Ithe current you want in amperes.- The standard value is the smallest E12 or E24 (IEC 60063) preferred value that is at least
R. - With that part, the real current is
(Vs − n × Vf) ÷ R_std, the resistor power isI² × R_stdand the supply power isVs × I.
Worked example
9 V supply, one 2 V LED, 20 mA. R = 7 ÷ 0.02 = 350 Ω. The next E24 value is 360 Ω (E12: 390 Ω). Real current 7 ÷ 360 = 19.44 mA, resistor power 0.01944² × 360 = 136.1 mW, supply power 9 × 0.01944 = 175 mW.
Frequently asked questions
How do I calculate the resistor for an LED?
Subtract the LED forward voltage from the supply and divide by the current: R = (Vs − Vf) ÷ I. For 9 V, 2 V and 20 mA that is 7 ÷ 0.02 = 350 Ω.
Why round up to a standard value?
A higher resistance gives slightly less current, which is the safe side. 350 Ω is not a standard value; the next E24 value is 360 Ω (E12: 390 Ω), giving 7 ÷ 360 = 19.4 mA.
How do several LEDs in series change the result?
Their forward voltages add. Three 2 V LEDs on 12 V leave 6 V for the resistor, so R = 6 ÷ 0.02 = 300 Ω. The supply must exceed the total LED voltage.
What power rating does the resistor need?
Power is I² × R. With 19.4 mA through 360 Ω it is about 136 mW, so a common 250 mW (1/4 W) part works, though a larger margin keeps it cooler.
Is this safe to rely on for a real build?
It is for learning and design checks, not safety certification. Forward voltage varies with colour, current and temperature, so check the LED datasheet and test the circuit.