Related tools
- Ohm's Law & LED CalculatorSolve voltage, current, resistance, and power, plus LED resistor and voltage divider math.
- Resistor Color Code CalculatorDecode 3, 4, 5, and 6 band resistor color codes into resistance and tolerance, or encode a target resistance into bands.
- Wire Gauge CalculatorLook up AWG and metric wire sizes, calculate voltage drop over a run, and find the smallest gauge that meets ampacity.
- PCB Trace Width CalculatorCalculate IPC-2221 trace width for a target current, copper weight, and temperature rise, or the max current a given width can carry.
- Voltage Divider CalculatorWork out output voltage, resistor values, loaded-divider sag, and common-supply ratio tables for a two-resistor divider.
- Battery Life EstimatorModel runtime from battery capacity, sleep draw, and active draw, in whatever units your datasheet uses.
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. Input is plain text like "vin=9 if=20mA" or "vin=12 vf=3.2 series=3", not a form. 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 add a vf= token with the forward voltage from the datasheet. Then type the supply voltage as vin= and, optionally, the target current as if= (defaults to 20 mA), how many LEDs are wired in series as series=, and how many parallel resistor-and-LED strings as parallel=. The result shows the exact resistor value plus the nearest standard part in both directions across three series densities.
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.