LED resistor calculator
Enter your values. The answer and the full worked solution update as you type.
Result
Forward voltages are typical values; check the datasheet of your LED. This formula is for a DC supply. Never connect LEDs to the mains or to AC through a resistor.
Find the series resistor for one LED or a string of LEDs in series. Enter the supply voltage, the LED colour (or its forward voltage), the current and the number of LEDs. The calculator finds the exact resistance, rounds it up to the next E12 or E24 standard value, and gives the current you will actually get, the power in the resistor and a suitable power rating.
Step-by-step solution
Voltage across the resistor
Ohm’s law
Standard value
Power rating
Key formulas
- Diode (constant drop)
- VD = 0.7 V when conducting
How to choose a resistor for an LED
- Find the forward voltage V_f and the current of the LED in its datasheet. Typical values are about 2 V for red and 3.2 V for blue and white LEDs, at 20 mA for a standard 5 mm LED.
- Subtract the forward voltages from the supply: V_R = V_s − n·V_f. This is the voltage the resistor has to take.
- Ohm’s law gives the resistance: R = V_R/I.
- Round up to the next standard value, so the current stays at or just below the target.
- Calculate the power P = I²·R and choose a resistor rated for at least twice that.
Questions and answers
Why does an LED need a resistor?
The current through an LED rises very steeply once the voltage passes its forward voltage, so a small change in the supply voltage would cause a large change in current. The resistor sets the current and keeps the LED from burning out.
Can I put several LEDs in parallel with one resistor?
It is not recommended. LEDs have slightly different forward voltages, so one of them takes most of the current. Give each parallel string its own resistor.
Why round up instead of to the nearest value?
A larger resistor gives a slightly smaller current, which is safe for the LED. Rounding down could push the current above its rating.
What if the supply voltage is close to the forward voltage?
Then little voltage is left for the resistor, and small differences in forward voltage between LEDs, or with temperature, change the current a lot. Leave at least a volt or so for the resistor, or use a constant-current driver.
What are E12 and E24 values?
Standard series of preferred resistor values, with 12 or 24 values per decade spaced so that each is about 20% (E12) or 10% (E24) above the previous one. E12 resistors are usually sold with a 10% tolerance and E24 resistors with 5%.
Practise it yourself
Practise Diodes & transistors
A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.