LED Resistor Calculator

Work out the current-limiting resistor for an LED from supply and forward voltage, with nearest E12, E24, and E96 standard values in both directions.

Input

Only needed with the Custom preset. From the datasheet.

Optional. Defaults to 20 mA.

Optional. LEDs per string.

Optional. Each string gets its own resistor.

Related tools

What it does

Calculates the current-limiting resistor for one or more LEDs from a supply voltage, LED forward voltage, and target current, using either a color preset or a custom forward voltage. For every calculation it shows the nearest E12, E24, and E96 standard resistor values both at or above and at or below the exact result, each with the current, power, and recommended wattage that value actually produces.

How to use it

Pick an LED color preset, or choose Custom and fill in the forward voltage from the datasheet. Enter the supply voltage and, optionally, the target current (defaults to 20 mA), how many LEDs are wired in series, and how many parallel resistor-and-LED strings. The result shows the exact resistor value plus the nearest standard part in both directions across three series densities. Choose "Type it instead" to enter the same values as text, such as vin=12 vf=3.2 series=3, which is also the form the curl API takes.

Why this one

Most LED resistor calculators online show only one rounded value from one series and a single direction, so you never see what happens if the nearest standard part is smaller than the exact calculation instead of larger. This one covers E12, E24, and E96 in both directions with the resulting current and power for each candidate, flags when the resistor needs more than a quarter-watt rating, and your files and inputs never leave your device.

FAQ
Why does the calculator default the LED current to 20 mA?
20 mA is the typical forward current for a standard 3mm or 5mm indicator LED and is a safe, commonly used target when a datasheet is not at hand. High brightness or specialty LEDs often run at a different current, so enter if= explicitly when you know the real value.
Why show both a resistor at or above and one at or below the exact value?
The at-or-above value guarantees the LED current stays at or below your target, which is the safer default. The at-or-below value runs the LED slightly brighter and draws slightly more current, which some builds prefer when the at-or-above option is a big step away from the exact calculation.
What is the difference between E12, E24, and E96 resistor series?
E12, E24, and E96 are standard sets of manufactured resistor values per decade, with 12, 24, and 96 steps respectively. E12 has widely spaced values and is common in low precision hobby parts, E24 fills in more steps, and E96 is a dense 1 percent tolerance series that gets you closest to any exact calculated value.

Keyboard shortcuts: press ? anywhere on this page to see them.