How it works
The resistor value is Ohm's law applied to the voltage the LEDs do not use: R = (Vs − n × Vf) ÷ I, with the milliamp figure converted to amps first. At the defaults of a 9 V supply, 2.0 V forward voltage, 20 mA and one LED, that is 7 V ÷ 0.02 A = 350 Ω. The tool then rounds up to the next standard value in your chosen series, 390 Ω in E12, recalculates the real current through it at 17.9 mA, and reports P = V_R × I.
Forward voltage moves the answer most, and the preset row fills it in: Red 2.0 V, Yellow 2.1 V, Green 2.2 V, Blue and White 3.2 V, IR 1.5 V, UV 3.5 V. Use your LED's datasheet where you have one. LEDs in series multiplies Vf, not the current. The resistor series only decides which stock value you are offered, with E12 (10%) giving coarse steps and E24 (5%) landing closer to the exact figure, and both round upward so actual current lands at or below your target.
One resistor, one series string. Putting LEDs in parallel behind a single resistor is not modelled, and should not be built that way, since the lowest-Vf LED takes more than its share of the current. Forward voltage is treated as a constant, but real Vf shifts with current, temperature and production batch, so measured current will differ from the figure shown. The recommended wattage is simply twice the calculated dissipation, with no allowance for a hot enclosure or a constant-current driver.
Frequently asked questions
What resistor do I need for a red LED on a 9V battery? +
With the Red preset at 2.0 V and 20 mA, the resistor has to drop 7 V, so the exact value is 350 Ω. The nearest E12 part is 390 Ω, which brings current down to 17.9 mA, slightly dimmer but comfortably inside the LED's rating.
How many LEDs can I run in series from one supply? +
As many as fit under the supply with headroom left for the resistor. Four 3.2 V white LEDs need 12.8 V, so a 12 V supply fails and the tool reports Supply too low; three need 9.6 V and leave 2.4 V across the resistor.
Should I pick the E12 or E24 resistor series? +
E12 is the 10% tolerance range with twelve values per decade, which is what most beginner kits contain. E24 is the 5% range with twenty-four values, so it lands closer to the exact figure, offering 360 Ω instead of 390 Ω against a 350 Ω target.
Why is the suggested resistor always bigger than the calculated value? +
Rounding up is the safe direction. More resistance means less current than your target, whereas the next value down would push past the LED's rated forward current. The Current at nearest row shows what you give up, 17.9 mA against a 20 mA target on the defaults.
What power rating does the resistor need? +
The tool doubles the dissipated power for headroom and picks a standard rating from that. On the defaults the resistor burns 126 mW, so doubling gives 251 mW and it recommends a 1/2 W part rather than a marginal 1/4 W one.
Ohm's law, and where the voltage goes
The resistor drops the difference between supply voltage and the LED's forward voltage, at the current you want: R = (V_supply − V_forward) ÷ I. With a 9 V supply, a 2 V red LED and 20 mA, that is 350 Ω.
Forward voltage is a property of the LED's chemistry rather than a choice — red is typically around 1.8–2.2 V, while blue and white run 3–3.4 V. Using a red LED's figure for a white one produces a resistor that passes far more current than intended.
E-series values and power rating
The calculated resistance rarely exists as a stocked part, which is what the E12 and E24 series options are for — they are the standard preferred values, spaced logarithmically. Round UP to the next available value: a slightly larger resistor gives slightly less current and a marginally dimmer LED, while rounding down runs the LED over its rated current and shortens its life.
Power dissipation is the check people skip. The resistor dissipates (V_dropped × I) watts, and at higher supply voltages that can exceed the quarter-watt rating of a typical resistor — a 12 V supply driving a 2 V LED at 20 mA dissipates 200 mW, which is uncomfortably close.
Never drive an LED without current limiting. Their forward voltage falls as they heat, which draws more current, which heats them further — a runaway that destroys the LED quickly.