Home › Calculators › LED Resistor Calculator

LED Resistor Calculator

Enter the supply voltage, the LED's color or forward voltage and the current you want. You get the exact resistance, the standard resistor to buy, its wattage, color bands and a circuit diagram.

Last updated:

Wiring
Resistor series
Use this resistor–
Exact resistance–
Actual LED current–
Resistor power–
LED power–
Total current–
Efficiency–
SeriesNext higher (safe)Nearest

Circuit diagram

Advertisement
Advertisement

How to use the LED Resistor Calculator

  1. Enter the supply voltage, for example 5 V from USB or 12 V from an adapter.
  2. Choose the LED color or type the forward voltage from its datasheet.
  3. Set the current: 20 mA is typical for standard 5 mm LEDs; 2 to 10 mA is often bright enough for indicators.
  4. Choose the wiring and number of LEDs for a series string or parallel LEDs.
  5. Read the result: buy the recommended standard resistor with at least the wattage shown.

The LED resistor formula

R = (Vs − n × Vf) ÷ I

Vs is the supply voltage, Vf the LED forward voltage, n the number of LEDs in series and I the current in amps (20 mA = 0.02 A). The resistor's power is P = I² × R, and each LED uses Vf × I.

Example: a white LED (3.2 V) on a 9 V battery at 20 mA needs (9 − 3.2) ÷ 0.02 = 290 Ω. That is not a standard value, so use the next higher one: 330 Ω in E12 or 300 Ω in E24. With 330 Ω the actual current is 5.8 ÷ 330 = 17.6 mA and the resistor dissipates 0.0176² × 330 = 0.10 W, so a 1/4 W resistor gives a comfortable 2× margin.

Resistor values for common setups (20 mA)

SupplyRed / yellow (2.0 V)Green, true (3.2 V)Blue / white (3.2 V)
3.3 V65 Ω → 68 Ω5 Ω (too little headroom)5 Ω (too little headroom)
5 V150 Ω90 Ω → 100 Ω90 Ω → 100 Ω
9 V350 Ω → 390 Ω290 Ω → 330 Ω290 Ω → 330 Ω
12 V500 Ω → 560 Ω440 Ω → 470 Ω440 Ω → 470 Ω
24 V1,100 Ω → 1.2 kΩ (1 W)1,040 Ω → 1.2 kΩ (1 W)1,040 Ω → 1.2 kΩ (1 W)

Values after the arrow are the next higher E12 standard resistor. For 3.3 V with blue or white LEDs, lower the current or check the datasheet's Vf, since only about 0.1 V is left for the resistor.

Typical LED forward voltages

LED colorTypical VfRangeWavelength
Infrared1.3 V1.2–1.6 V850–940 nm
Red2.0 V1.8–2.2 V620–660 nm
Orange / yellow2.1 V1.9–2.2 V585–610 nm
Green (classic, yellow-green)2.2 V2.0–2.4 V565–570 nm
Green (true, bright)3.2 V2.9–3.4 V520–530 nm
Blue3.2 V2.9–3.4 V460–470 nm
White3.2 V2.9–3.4 Vbroad spectrum
UV / violet3.4 V3.1–3.8 V365–405 nm

E12 and E24 standard resistor values

Resistors are sold in standard series that repeat in every decade (×1, ×10, ×100 …).

  • E12: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82
  • E24: 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91

So the E12 values around a few hundred ohms are 220, 270, 330, 390, 470, 560, 680 and 820 Ω.

Frequently asked questions

What resistor do I need for an LED on 5V?

For a red LED (about 2 V) at 20 mA on 5 V, the resistor is (5 − 2) ÷ 0.02 = 150 Ω, a standard value. For a blue or white LED (about 3.2 V) it is (5 − 3.2) ÷ 0.02 = 90 Ω, so use the next standard value of 100 Ω. A 1/4 W resistor is plenty for both.

What resistor do I need for an LED on 12V?

A single red LED at 20 mA on 12 V needs (12 − 2) ÷ 0.02 = 500 Ω, so use 560 Ω (E12) or 510 Ω (E24). It dissipates about 0.18 W, so use a 1/2 W resistor for a safe margin. Wiring three red LEDs in series instead needs only (12 − 6) ÷ 0.02 = 300 Ω and wastes less power.

Why does an LED need a resistor?

An LED's current rises very steeply once the voltage passes its forward voltage, so connecting it directly to a supply lets the current run away and burn it out. The resistor takes up the extra voltage and sets the current according to Ohm's law.

Should I use the next higher or the nearest resistor value?

Use the next higher standard value. It keeps the current at or slightly below your target, which is safer for the LED and barely changes the brightness. A lower value can push the current above the LED's rating.

Can I use one resistor for several LEDs in parallel?

It is not recommended. LEDs have slightly different forward voltages, so one LED takes more of the current, heats up and fails, and then the others get overloaded. Give each parallel LED its own resistor, or wire them in series with one resistor.

How do I calculate the resistor for LEDs in series?

Add up the forward voltages and subtract them from the supply, then divide by the current: R = (Vs − n × Vf) ÷ I. Three white LEDs (3.2 V each) on 12 V at 20 mA need (12 − 9.6) ÷ 0.02 = 120 Ω. The supply must be higher than the total forward voltage.

What wattage resistor do I need for an LED?

Calculate the power with P = I² × R and choose a resistor rated for at least twice that. A 150 Ω resistor at 20 mA dissipates 0.06 W, so a 1/8 W or 1/4 W resistor is fine. Higher supply voltages waste more power in the resistor and may need 1/2 W or 1 W parts.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Ohm's Law CalculatorSolve voltage, current, resistance and power from any two values.Resistor Color Code CalculatorRead 4, 5 and 6 band resistor colors, or find colors for a value.Voltage Divider CalculatorVout from R1, R2 and Vin, with loaded and unloaded output.Electricity Cost CalculatorEstimate kWh usage and electricity costs.555 Timer CalculatorAstable frequency, duty cycle and monostable pulse width for the NE555 timer.Battery Life CalculatorEstimate how long a battery lasts from its mAh or Wh and the load.Capacitor Series and Parallel CalculatorTotal capacitance of capacitors in series or parallel, plus stored energy ½CV² and charge.Capacitor Code CalculatorDecode 3-digit capacitor codes to pF, nF and µF, and back.Power Factor CalculatorCalculate power factor, kW, kVA and kVAR, and correction capacitor size.EV Charging Cost CalculatorCost to charge an electric car, per charge, per mile and per km.Wire Size CalculatorFind the AWG or kcmil wire size for a load from amps, distance, voltage and allowed voltage drop.Solar Panel CalculatorEstimate solar system size, number of panels and roof area from your monthly kWh and sun hours.Voltage Drop CalculatorVoltage drop in volts and percent for copper or aluminum wire, AWG or mm², 1- or 3-phase.RC Time Constant Calculatorτ = RC, charge % at 1-5τ, and capacitor charge or discharge voltage at any time t.Resonant Frequency CalculatorLC resonant frequency f = 1/(2π√LC), or solve the inductance or capacitance you need.Generator Size CalculatorAdd appliance running and starting watts to find the generator size you need.LED Savings CalculatorYearly savings, kWh saved and payback time when switching old bulbs to LED.Battery Bank Size CalculatorSize a solar or off-grid battery bank: Ah, kWh and battery count from daily Wh and autonomy.Battery Charge Time CalculatorHow long to charge a battery: mAh or Ah, charger current, efficiency and current charge %.Circuit Breaker Size CalculatorBreaker size from watts or amps, voltage and the 125% continuous rule, with a wire gauge.Conduit Fill CalculatorCheck conduit fill % against the NEC 40% limit for EMT, PVC, RMC and more, with pass/fail.Home Electrical Load CalculatorHome service load in VA and amps with NEC demand factors and a 100/150/200 A recommendation.EV Charging Time CalculatorHow long to charge an EV: battery kWh, charge levels and charger kW, with Level 1/2/DC presets.RLC Impedance CalculatorSeries or parallel RLC impedance, phase angle, resonant frequency and Q at any frequency.Inverter Size CalculatorFind the inverter size for your appliances: continuous watts, surge and battery current.ND Filter CalculatorLong exposure shutter speed for any ND filter in stops, ND number or density.Op Amp Gain CalculatorInverting, non-inverting or differential op amp gain in V/V and dB, with output voltage.PCB Trace Width CalculatorMinimum PCB trace width for a current per IPC-2221, for internal and external layers.RC Filter Cutoff CalculatorRC low-pass or high-pass cutoff frequency, solve R or C, with a Bode magnitude chart.Reactance CalculatorInductive and capacitive reactance at any frequency, or solve for L, C or frequency.SMD Resistor Code CalculatorDecode 3-digit, 4-digit and EIA-96 SMD resistor codes, or find the code for a value.Solar Panel Tilt Angle CalculatorBest fixed tilt, seasonal and monthly solar panel angles and direction for any latitude.Transformer Turns Ratio CalculatorSolve transformer voltage, turns or turns ratio, with primary/secondary current and VA.UPS Runtime CalculatorEstimate UPS battery backup time from battery V, Ah, count, efficiency and load, with Peukert.PC Power Supply CalculatorEstimate your PC's load watts and the PSU wattage you need, with efficiency running costs.Power to Weight Ratio CalculatorVehicle hp per tonne, lb per hp and kW/kg from power and weight; compare cars and bikes.Solar Charge Controller Size CalculatorSize an MPPT or PWM charge controller in amps from panel watts, Voc, Isc and battery voltage.4-20mA CalculatorScale a 4-20 mA signal to a process value and back, with percent and shunt voltage.DC Circuit SimulatorDraw batteries, resistors, bulbs and switches and see voltages and currents flow live.E-Bike Range CalculatorEstimate e-bike miles or km per charge from battery Wh, assist level, weight, speed and hills.Lewis Structure GeneratorDraw Lewis dot structures with valence electrons, lone pairs, formal charges and VSEPR shape.LM317 CalculatorLM317 output voltage from R1 and R2, standard resistors for a target voltage, current limiter.Motor Full Load Current CalculatorFull load amps from motor hp or kW, voltage, phase, efficiency and power factor, with NEC values.Population Growth CalculatorExponential or logistic population growth over time with carrying capacity, table and chart.Rocket Launch ScheduleUpcoming orbital rocket launches with live countdowns, launch windows, pads and filters.Transformer Sizing CalculatorTransformer kVA needed from volts and amps or kW and PF, next standard size and full-load amps.Antenna Length CalculatorDipole, quarter-wave and 5/8-wave antenna lengths for any frequency or radio band.Battery Pack Calculator18650, 21700 or LiFePO4 series/parallel pack: voltage, Ah, Wh, max current and weight.
See all 51 Electrical & Electronics Calculators →