LED Resistor Calculator
Calculate the correct current-limiting resistor for any LED circuit. Enter supply voltage, LED forward voltage, desired current and number of LEDs in series: get resistor value and power dissipation instantly.
Last updated: May 2026
Enter supply voltage, LED Vf, current and LED count to calculate.
R = (Vs − N × Vf) ÷ If · P = If² × R
Device presets
LED current limiting: why it matters
LEDs are current-controlled devices. Without a resistor (or constant-current driver), the forward voltage drop is almost flat, and a small rise in supply voltage causes a large rise in current, quickly destroying the LED. The resistor drops the excess voltage as heat, keeping current constant at the rated value. The same Ohm's law reasoning underpins most of the other calculators in our Electronics calculators hub, so the value you find here ties directly into resistor-coding and power checks.
The formula: R = (Vs − N × Vf) ÷ If. The numerator is the voltage left for the resistor after the LEDs claim their share. Divide by the target current to get resistance.
Common LED forward voltage by colour
| Colour | Typical Vf | Max If |
|---|---|---|
| Infrared | 1.2-1.8 V | 50-100 mA |
| Red | 1.8-2.2 V | 20-30 mA |
| Orange / Yellow | 2.0-2.2 V | 20 mA |
| Green (standard) | 2.0-2.4 V | 20 mA |
| Blue / White | 3.0-3.4 V | 20-30 mA |
| UV (400 nm) | 3.4-3.8 V | 20 mA |
From Ohm's Law to the resistor you actually solder
Sizing a series resistor is one step in a sequence that takes you from raw voltage and current numbers to a real, installed component. Here is where this calculator sits:
- Establish the base numbers. Every LED circuit starts with V=IR. The Ohm's Law calculator pins down voltage, current, resistance and power so the rest of the steps have solid inputs.
- You are here: size the LED series resistor. Supply voltage minus the total LED forward-voltage drop, divided by the target current, gives the required resistance. This calculator does that arithmetic and snaps the result to the nearest E12 and E24 standard value.
- Set a reference voltage or scale a signal. If the LED shares a rail with a microcontroller input, a divider keeps the level in range. The voltage divider calculator works out Vout and the quiescent current through the divider.
- Match the calculated value to a physical part. Resistors are labelled with colour bands, not numbers. Decode the bands with the resistor color code tool to confirm you are picking the right component from the bin.
- Check the supply can deliver the total load. Add up all the LED strings and any other loads, then verify the rail. The watts, volts and amps calculator confirms the supply has enough headroom.
- Account for voltage drop over long cable runs. LED strips on a 12 V camper rail or workshop bench can lose meaningful voltage over a few metres of thin cable. The voltage drop calculator sizes the wire to keep the far end bright.
- Estimate battery runtime if the circuit runs off a pack. Current draw against pack capacity gives hours of runtime. The battery life calculator adds a derating factor for real-world efficiency.
For non-DC circuits where reactance matters, the AC sub-chain starts with the impedance calculator, backed by the capacitor reactance and inductor reactance tools.
One thing worth noting from working with LED circuits on Arduino and ESP32 boards: always round the calculated resistor value UP to the next standard value you have in stock, never down. A slightly higher resistance means a marginally dimmer LED, which is fine. Going lower pushes more current through the LED than the formula intends and shortens its life, or trips the GPIO pin over its safe limit.
Frequently Asked Questions
What current should I target for a GPIO-driven indicator LED on 3.3 V versus 5 V?
On a 5 V Arduino pin (recommended limit 20 mA), targeting 10-15 mA gives a clearly visible indicator with comfortable margin. On a 3.3 V pin such as an ESP32 GPIO (recommended limit around 12 mA), 5-8 mA is more appropriate, keeping total current well inside the pin's safe range while the LED is still bright enough to read across a bench. For SMD LEDs (0402, 0603, 0805), consult the datasheet; maximum continuous current is often lower than the through-hole 5 mm equivalent. Always target well below the absolute maximum, not at it.
What happens if the resistor value is lower than calculated?
Current increases above the target. For example, if the calculation gives 150 Ω and you use 100 Ω, current rises by 50%. The LED may survive this at first but typically shows accelerated lumen depreciation (dimming over time). Sustained overcurrent above 120% of the rated maximum can destroy the LED within hours. Round up to the nearest standard E12 or E24 value, not down.
Can an Arduino or Raspberry Pi GPIO drive an LED directly?
Yes, with a resistor in series. Arduino GPIO pins are rated at 40 mA absolute max but 20 mA recommended per pin. Raspberry Pi GPIO pins are limited to 16 mA per pin (lower than Arduino). Use 8-10 mA for RPi GPIO-driven LEDs to stay comfortably within limits. The resistor is always required; never connect an LED pin-to-pin without one.
What resistor wattage rating do I need?
Calculate P = If² × R (in watts). Standard leaded resistors come in 1/8 W (0.125 W), 1/4 W (0.25 W), 1/2 W, 1 W and 2 W. Use a component rated at least 2× the calculated dissipation for safe continuous operation. A 20 mA circuit with a 150 Ω resistor dissipates 0.06 W; a standard 1/4 W resistor is more than adequate.
How do I wire multiple LEDs in parallel vs series?
Series (end-to-end): the forward voltages add up. R = (Vs − N×Vf) ÷ If: this calculator handles it. Advantage: one resistor per string. Disadvantage: if one LED fails open, all go out. Parallel: each LED gets its own resistor. Advantage: independent failure. Disadvantage: more components and slightly higher total current. For three or more identical LEDs on a fixed supply, series is usually more power-efficient.
Methodology and sources
This tool sizes the series current-limiting resistor for an LED circuit. It applies Ohm's law to the voltage left over after the LEDs take their forward-voltage share, then computes the resistor's power dissipation so you can pick an adequately rated part.
- Method: Resistor value R = (Vs − N × Vf) / If, where Vs is the supply voltage, N is the number of series LEDs, Vf is the per-LED forward voltage and If is the target current in amps. Power dissipation P = If² × R. The result is then snapped to the nearest E12 and E24 preferred value.
- Standards and sources: Standard DC circuit physics (Ohm's law and Kirchhoff's voltage law); preferred resistor values follow the IEC 60063 E12 / E24 series. LED forward-voltage and current figures are typical ranges; the actual values come from each LED's datasheet.
- Assumptions and limits: Assumes a simple resistor-limited DC circuit (not a constant-current driver), identical LEDs wired in series, and the forward current entered in milliamps. Real forward voltage varies with current and temperature, so always confirm Vf and the maximum current against the datasheet and round the resistor up, never down.
Reviewed and maintained by Rick Oosterling, who builds and wires 12 V, solar and EV systems hands-on. Last reviewed: June 2026. This calculator is a planning aid, not a substitute for a qualified professional or the datasheet and applicable safety requirements for your components.
Next step in this workflow
Resistor value found: now read the color bands to identify the component.