What this calculator does
An LED is a diode: once the voltage across it reaches its forward voltage , a tiny further increase makes the current shoot up. Connected straight to a battery, an LED either barely glows or draws so much current that it burns out. The simplest fix is a series resistor, which sets the current.
With identical LEDs in series, each one drops roughly , and the resistor takes the rest of the supply voltage . Ohm's law then gives the resistor:
Resistors are sold in standard values (the E-series of IEC 60063), so the calculator also picks the next standard value at or above . Rounding up means the real current is a little below what you asked for, never above it:
Finally it works out the power the resistor turns into heat, , and recommends a power rating at least twice that, chosen from the common sizes 1/16, 1/10, 1/8, 1/4, 1/2, 1, 2, 3, 5 and 10 W. It also shows how much power reaches the LEDs and what share of the supply power that is.
Choosing the inputs
- Forward voltage. Look it up in the LED datasheet at the current you plan to use. As a guide: red, orange and yellow LEDs are about 1.8–2.2 V; green 2.0–3.2 V (older yellow-green types are near 2 V, modern bright green near 3 V); blue and white about 2.8–3.4 V; infrared 1.2–1.5 V.
- Current. Small 3 mm and 5 mm indicator LEDs are usually rated for 20 mA continuous, but modern ones are bright at 2–5 mA. Running below the maximum makes them last longer.
- LEDs in series. All LEDs in a string carry the same current, so one resistor serves them all. The total forward voltage must stay below the supply.
- Resistor series. E12 (10 %) and E24 (5 %) are the values found in most parts drawers; E96 (1 %) is the common precision range.
How to use solve-for
You can work backwards from a resistor you already have. Click ⇄ Solve next to the LED current, pick Exact resistor value and type the resistance: the calculator returns the current that resistor gives. Solving the supply voltage for a target resistance works the same way.
Worked example
A red LED with = 2.1 V is to run at 20 mA from a 5 V supply. These are the calculator's defaults.
- Voltage across the resistor: = 2.9 V.
- Exact resistor: = 145 Ω. That is not a standard value.
- Standard value: the next E24 value at or above 145 Ω is 150 Ω.
- Actual current: = 19.333 mA, just under the 20 mA target.
- Resistor power: = 56.067 mW. Twice that is 112 mW, so the recommended rating is 125 mW (a 1/8 W resistor); a common 1/4 W resistor is more than enough.
- LED power and efficiency: the LED takes = 40.6 mW, which is 42 % of the power drawn from the supply. The rest heats the resistor.
Switching to E96 gives 147 Ω and 19.728 mA instead.
Accuracy and validity
The formula treats the LED as a fixed voltage drop. A real LED's forward voltage rises slowly with current and falls by about 2 mV per °C as it warms up, and it varies from one LED to the next, often by ±0.2 V. The resistor's own tolerance (5 % for E24) adds to this. In practice the current will be within about 10–20 % of the calculated value, which is fine for indicator lights.
| Headroom | What to expect |
|---|---|
| More than about 1–2 V | Current is set mainly by the resistor; robust. |
| Less than 20 % of | Current depends strongly on the exact ; the calculator warns you. |
| Zero or negative | The LEDs will not light properly; the calculator reports an error. |
Practical notes
- One resistor per LED for parallel LEDs. Do not put LEDs in parallel with one shared resistor. Their forward voltages differ slightly, so one LED takes most of the current and fails first.
- Power LEDs need a driver. For LEDs above about 100 mA, or when efficiency matters, use a constant-current driver instead of a resistor.
- Reverse voltage. LEDs tolerate only about 5 V in reverse. If the LED can see reverse voltage (for example on AC), add an ordinary diode in anti-parallel.
- Microcontroller pins. A typical GPIO pin can source or sink about 10–20 mA, and its output voltage sags under load, so the real current is often a little lower than calculated. Check the chip's datasheet.