Skip to content
FiftyOhm
Esc
  • Air-core coilSingle-layer air-core solenoid inductance from Nagaoka's exact coefficient, compared with Wheeler's formula. Solve for the number of turns for a target inductance.Components & magnetics
  • Attenuator PadsResistor values for Pi, T, bridged-T and minimum-loss L-pad attenuators, with unequal impedances, power dissipation per resistor and E24/E96 rounding.Couplers, dividers & attenuators
  • CoaxCoax Z0, capacitance and inductance per length, velocity factor, loss, exact TE11 cutoff and breakdown voltage. Solve for D, d or εr from Z0.Transmission lines
  • CPW / GCPWCoplanar waveguide and grounded CPW impedance, effective permittivity, dispersion, delay and loss by conformal mapping. Solve for centre width or gap.Transmission lines
  • dBm ↔ W ↔ VConvert RF power between dBm, dBW, watts, Vrms, Vpeak, Vpp, dBµV and dBmV for any system impedance. Instant, accurate, with formulas.Fundamentals & conversions
  • Differential pairEdge-coupled microstrip and stripline differential impedance, Z0 even/odd, common-mode impedance, coupling and delay. Solve for spacing or width from Zdiff.Transmission lines
  • Filter OrderMinimum filter order to meet a passband/stopband attenuation mask for Butterworth, Chebyshev and elliptic responses, with the attenuation actually achieved.Filters
  • Free-space path lossFree-space path loss from the Friis equation, received power with antenna gains, and a far-field check. Solve for distance or frequency.Propagation & link budget
  • L / Pi / T MatchingDesign lumped L, Pi and T matching networks between complex source and load impedances. Both L solutions, loaded-Q Pi/T, component values and bandwidth.Matching & Smith chart
  • LC Filter DesignerDesign lumped LC ladder filters: Butterworth, Chebyshev or Bessel; low-pass, high-pass, band-pass, band-stop to order 10, with exact insertion loss and group delay.Filters
  • LED ResistorSeries resistor for one LED or a string of LEDs: exact value, next standard E12/E24/E96 value, actual current, resistor power and recommended rating.Electronics basics

LED Resistor Calculator (Series Resistor for LEDs)

Series resistor for one LED or a string of LEDs: exact value, next standard E12/E24/E96 value, actual current, resistor power and recommended rating.

Inputs

From the LED datasheet at your current. Typical: red/yellow 1.8–2.2 V, green 2.0–3.2 V, blue/white 2.8–3.4 V, infrared 1.2–1.5 V.

Classic 3 mm / 5 mm indicator LEDs: 2–20 mA. Check the datasheet's maximum continuous current.

Results

Exact resistor value(R)
145
Next standard value above(Rstd)
150
Resistor power (standard value)(PR)
56.067
Recommended power rating (≥ 2 × PR)(Prated)
125
LED current with the standard resistor(I′)
19.333
Voltage across the resistor(VR)
2.9
Resistor power (exact value)(PR,exact)
58
Power in the LEDs (total)(PLED)
40.6
Share of supply power reaching the LEDs(η)
42%

Formulas

R=Vs−NVfIR = \frac{V_s - N V_f}{I}I′=Vs−NVfRstd,PR=I′2Rstd,Prated≥2PRI' = \frac{V_s - N V_f}{R_\mathrm{std}},\qquad P_R = I'^2 R_\mathrm{std},\qquad P_\mathrm{rated} \ge 2 P_Rη=NVfVs\eta = \frac{N V_f}{V_s}

What this calculator does

An LED is a diode: once the voltage across it reaches its forward voltage VfV_f, 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 NN identical LEDs in series, each one drops roughly VfV_f, and the resistor takes the rest of the supply voltage VsV_s. Ohm's law then gives the resistor:

R=Vs−NVfI.R = \frac{V_s - N V_f}{I}.

Resistors are sold in standard values (the E-series of IEC 60063), so the calculator also picks the next standard value at or above RR. Rounding up means the real current is a little below what you asked for, never above it:

I′=Vs−NVfRstd.I' = \frac{V_s - N V_f}{R_\mathrm{std}}.

Finally it works out the power the resistor turns into heat, PR=I′2RstdP_R = I'^2 R_\mathrm{std}, 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 NVfN V_f 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 VfV_f = 2.1 V is to run at 20 mA from a 5 V supply. These are the calculator's defaults.

  1. Voltage across the resistor: 5−2.15 - 2.1 = 2.9 V.
  2. Exact resistor: R=2.9 V/0.020 AR = 2.9\ \text{V} / 0.020\ \text{A} = 145 Ω. That is not a standard value.
  3. Standard value: the next E24 value at or above 145 Ω is 150 Ω.
  4. Actual current: I′=2.9/150I' = 2.9/150 = 19.333 mA, just under the 20 mA target.
  5. Resistor power: PR=0.0193332×150P_R = 0.019333^2 \times 150 = 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.
  6. LED power and efficiency: the LED takes 2.1×0.0193332.1 \times 0.019333 = 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 Vs−NVfV_s - N V_fWhat to expect
More than about 1–2 VCurrent is set mainly by the resistor; robust.
Less than 20 % of VsV_sCurrent depends strongly on the exact VfV_f; the calculator warns you.
Zero or negativeThe 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.

References

  1. P. Horowitz and W. Hill, The Art of Electronics, 3rd ed., Cambridge University Press, 2015, §2.1.2 and §9.10 (LEDs and current limiting).
  2. IEC 60063:2015, Preferred number series for resistors and capacitors, International Electrotechnical Commission, 2015 (E12, E24 and E96 values).
  3. E. F. Schubert, Light-Emitting Diodes, 2nd ed., Cambridge University Press, 2006, ch. 4 (LED current–voltage characteristic and forward voltage).