LED resistor calculator
This LED resistor calculator works out the series resistor you need to run one LED or a string of LEDs from a given supply voltage, using the LED’s forward voltage and your target current. It rounds the exact result up to the nearest standard E12 resistor value and shows how much power that resistor will dissipate, so you can choose both a value and a wattage rating you can actually buy.
How to use it
- Enter your supply voltage, for example 5 V from USB, 9 V from a battery or 12 V from an adapter.
- Enter the LED’s forward voltage. Take it from the datasheet if you have one. Without a datasheet, red LEDs typically sit around 1.8 to 2.2 V and blue or white LEDs around 2.8 to 3.3 V.
- Enter the current you want through the LED. Many standard 5 mm indicator LEDs are rated for 20 mA, but check your part, and run lower if you want less brightness and heat.
- Enter how many LEDs share the resistor. The calculation treats them as a single series string.
- Read the result: the exact resistance, the E12 value rounded up from it, and the power the resistor dissipates. Pick a physical resistor with a power rating comfortably above that figure.
How the calculation works
An LED needs current limiting because its current rises very steeply once the voltage across it passes the forward voltage. A series resistor absorbs the leftover voltage and sets the current. Ohm’s law gives the value:
R = (Vsupply − n × Vf) / I
Here n is the number of LEDs in series, Vf is the forward voltage of one LED and I is the current in amps (20 mA = 0.02 A). The power the resistor turns into heat is P = I² × R, which equals the voltage across the resistor multiplied by the current.
Exact results rarely match a resistor you can buy, so the tool rounds up to the E12 series. E12 is one of the preferred number series defined in IEC 60063. It has 12 values per decade (1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2), repeated at 10 Ω, 100 Ω, 1 kΩ and so on, and it is spaced to suit 10% tolerance parts. Rounding up rather than to the nearest value matters. A slightly larger resistor gives slightly less current than you asked for, which keeps the LED inside its rating instead of above it.
A worked example: three white LEDs at 3.1 V each on a 12 V supply at 20 mA. The resistor drops 12 − 9.3 = 2.7 V, so R = 2.7 / 0.02 = 135 Ω. The next E12 value up is 150 Ω, which gives about 18 mA in practice (2.7 / 150). The resistor dissipates roughly 0.05 W, so a common 1/4 W part is plenty. A sensible rule is to choose a power rating at least double the calculated dissipation.
What the tool does not do: it does not know your specific LED, so the answer is only as good as the forward voltage and current you enter. It does not model how forward voltage shifts with temperature or between parts, and it does not design parallel circuits, constant-current drivers, PWM dimming or heatsinking for high-power LEDs. If the total forward voltage of the string reaches or exceeds the supply voltage, no resistor value will work. Use fewer LEDs per string or a higher supply.
FAQ
Can I wire several LEDs in parallel with one resistor?
It is a poor idea. Small differences in forward voltage mean one LED can take most of the current and burn out, after which the others get overloaded in turn. Give each parallel branch its own resistor and calculate each branch separately with this tool.
Why round up instead of picking the closest resistor?
A higher resistance always means lower current, so rounding up can only make the LED run slightly dimmer and cooler than your target. Rounding down could push it past the current you specified. The difference in brightness between, say, 18 mA and 20 mA is hard to see.
What if I only have E6 or E24 resistors?
E24 contains every E12 value plus intermediate ones, so the E12 result is always available in an E24 kit. With an E6 kit, which holds every other E12 value, go up to the next E6 value if the result is missing. You can also combine resistors in series to reach the exact value.
Do I need a resistor if my supply voltage matches the LED’s forward voltage?
Yes, in almost every case. Forward voltage varies between parts and drops as the LED warms up, so a direct connection gives unpredictable and often destructive current. The exception is a dedicated constant-current driver, which regulates the current itself and replaces the resistor.
