Subtract the sum of the series LEDs' Vf from the supply voltage and divide by the desired current in amps: R = (Vsupply − N × Vf) ÷ I. For 5 V, a 1.8 V red LED and 20 mA, R = (5 − 1.8) ÷ 0.02 = 160 Ω.
Find the right resistor for one or more LEDs, with standard value, power rating and color bands
An LED does not limit its own current: above its forward voltage, a small rise in voltage makes the current shoot up. The series resistor sets that current. The math is Ohm's law on the voltage left after the LEDs: R = (Vsupply − N × Vf) ÷ I, where N is the number of LEDs in series. The result is rarely a value you can buy, so the tool goes up to the next value in the chosen series (E12, E24 or E96): a smaller value would let through more current than requested. It then shows the real current with the standard value, the power the resistor dissipates (P = I² × R), a suggested power rating with a 2x margin and the color bands so you can check the part by eye. Vf changes with color: Wikipedia lists 1.63 to 2.03 V for red, 2.1 to 2.18 V for yellow, 2.48 to 3.7 V for blue and 2.7 to 3.5 V for white. That is why the tool also shows the current range you get if your LED's Vf lands anywhere in that interval.
Take a 5 V supply and a red LED with a Vf of 1.8 V at 20 mA. That leaves 3.2 V for the resistor, so R = 3.2 ÷ 0.02 = 160 Ω. That value exists in the E24 series (160 Ω) but not in E12, where the neighbors are 150 Ω and 180 Ω. With 150 Ω the current would be 21.3 mA, above the request. The tool picks 180 Ω, which gives 17.8 mA: a slightly dimmer LED, never an overdriven one.
The same reasoning holds for several LEDs in series. Three 3.1 V white LEDs on a 12 V supply drop 9.3 V, leaving 2.7 V, and at 20 mA R = 135 Ω. E12 goes up to 150 Ω, and the real current is 18 mA, with 48.6 mW in the resistor, well inside a 1/8 W part.
In series, the same current flows through every LED and the voltage drops add up, so the supply has to be higher than N × Vf. In parallel, each branch has its own current and the right design is one resistor per branch. Two LEDs from the same maker have slightly different Vf values, and with a single shared resistor the one with the lower Vf would take more current than the other.
If the math returns a low-supply error, the cause is the sum of the Vf values. On 12 V with 2 V LEDs at most 5 fit in series (10 V), leaving 2 V for the resistor. Six 2 V LEDs would add up to 12 V and leave no voltage to limit the current.
Vf is a typical value: Wikipedia's range for green, 1.9 to 4 V, shows how your LED's datasheet matters more than the color. The 20 mA current is a starting point; Wikipedia itself cites typical currents from about 1 mA to above 20 mA for small LEDs. Power LEDs need a constant-current driver, not a resistor. This tool is for low-voltage direct current (up to 60 V) and is not for wiring an LED to a 110 or 220 V outlet.
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
<iframe
src="https://jkit.tools/embed/en-US/led-resistor-calculator"
width="100%"
height="600"
style="border:0"
loading="lazy"
title="LED Resistor Calculator"
></iframe>
<p style="font-size:12px;margin:6px 0 0">Tool by <a href="https://jkit.tools/en/tools/led-resistor-calculator">J-Kit</a></p>Using it in a paper, class or post? Copy the link or a ready-made reference. The access date is today's.
<a href="https://jkit.tools/en/tools/led-resistor-calculator">LED Resistor Calculator</a>
These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
Subtract the sum of the series LEDs' Vf from the supply voltage and divide by the desired current in amps: R = (Vsupply − N × Vf) ÷ I. For 5 V, a 1.8 V red LED and 20 mA, R = (5 − 1.8) ÷ 0.02 = 160 Ω.
If the real Vf of your LED falls between 1.63 and 2.03 V (the range for this color), the current is between 16.5 and 18.7 mA with this resistor.
The calculation runs in your browser; no value is sent to a server. The tool is for low-voltage direct current only, never for wiring an LED straight to the mains.