LED Resistor Calculator
The resistor for an LED is the supply voltage minus the LED's forward voltage, divided by the current you want: R = (Vs − Vf) ÷ I. For a 9 V supply, a red LED at a typical 2 V and 20 mA that is (9 − 2) ÷ 0.02 = 350 Ω. That is not a standard value, so use the next E24 value up, 360 Ω (Orange, Blue, Brown, Gold), which gives 19.44 mA and dissipates 0.136 W, so a 1/2 W or larger resistor has a 2× margin. Only 22.2% of the supply power reaches the LED; the rest is heat in the resistor. Forward voltages here are typical figures, so check your LED's datasheet.
Updated Runs in your browser: nothing you enter is uploadedHow this tool works
9 V supply, 2 V LED, 20 mA, 1 in series
Use 360 Ω
- Exact resistor
- 350 Ω
- Standard E24 value (at or above)
- 360 Ω
- Color bands
- Orange, Blue, Brown, Gold (4-band, ±5%)
- Actual current per string
- 19.44 mA
- Compared with your target
- −2.78%
- Voltage across the resistor
- 7 V
- Resistor power (each)
- 0.136 W
- Recommended rating (2×)
- 0.272 W, so 1/2 W or larger
- Power in each LED
- 38.89 mW
- Power in the LED
- 38.89 mW
- Total current from the supply
- 19.44 mA
- Power from the supply
- 175 mW
- Efficiency (LED power ÷ supply power)
- 22.2%
The working
- Voltage across the resistor = supply − LEDs = 9 V − 1 × 2 V = 7 V.
- Exact resistor = 7 V ÷ 0.02 A = 350 Ω.
- Next E24 value at or above it: 360 Ω.
- Actual current = 7 V ÷ 360 Ω = 19.44 mA.
- Resistor power = 0.01944 A² × 360 Ω = 0.136 W; with a 2× margin, 0.272 W.
- Efficiency = LED power ÷ supply power = 38.89 mW ÷ 175 mW = 22.2%.
Typical LED forward voltage by color
| Color | Typical Vf | Range | Chip material | E24 resistor, 5 V and 20 mA |
|---|---|---|---|---|
| Infrared (940 nm) | 1.2 V | 1.1 to 1.6 V | GaAs / AlGaAs | 200 Ω |
| Red | 2 V | 1.6 to 2.6 V | AlInGaP / GaAsP | 150 Ω |
| Orange / amber | 2 V | 1.8 to 2.6 V | AlInGaP | 150 Ω |
| Yellow | 2.1 V | 1.9 to 2.7 V | AlInGaP / GaAsP | 150 Ω |
| Green (classic, GaP) | 2.2 V | 1.9 to 2.7 V | GaP | 150 Ω |
| Green (bright, InGaN) | 3.2 V | 2.8 to 4.1 V | InGaN | 91 Ω |
| Blue | 3.2 V | 2.8 to 4 V | InGaN | 91 Ω |
| White | 3.2 V | 2.8 to 3.8 V | InGaN + phosphor | 91 Ω |
| Ultraviolet (395 nm) | 3.6 V | 3.2 to 4.2 V | InGaN | 75 Ω |
Resistor for a red LED at 20 mA by supply voltage
| Supply | Exact resistor | E24 resistor | Actual current | Resistor power | Efficiency |
|---|---|---|---|---|---|
| 3.3 V | 65 Ω | 68 Ω | 19.12 mA | 0.0249 W | 60.6% |
| 5 V | 150 Ω | 150 Ω | 20 mA | 0.06 W | 40% |
| 9 V | 350 Ω | 360 Ω | 19.44 mA | 0.136 W | 22.2% |
| 12 V | 500 Ω | 510 Ω | 19.61 mA | 0.196 W | 16.7% |
| 24 V | 1.1 kΩ | 1.1 kΩ | 20 mA | 0.44 W | 8.33% |
LEDs in series on 12 V (3.2 V each, 20 mA)
| LEDs in series | Total LED voltage | Exact resistor | E24 resistor | Efficiency |
|---|---|---|---|---|
| 1 | 3.2 V | 440 Ω | 470 Ω | 26.7% |
| 2 | 6.4 V | 280 Ω | 300 Ω | 53.3% |
| 3 | 9.6 V | 120 Ω | 120 Ω | 80% |
How to calculate the resistor for an LED
- Enter the supply voltage. Type the voltage that drives the LED and its resistor. The example is a 9 V battery. The supply must be higher than the LEDs' total forward voltage, otherwise the tool shows an error.
- Pick the LED color or type its forward voltage. Choosing a color fills in its typical forward voltage (red is 2 V). If you have the datasheet, type its forward voltage at your current instead, because typical values vary between parts.
- Enter the forward current. Type the current in milliamps. Indicator LEDs are often run at 10 to 20 mA or less; do not exceed the maximum continuous current on the datasheet. The example is 20 mA.
- Set the number of LEDs in series and parallel strings. LEDs in series share one current and add their voltages. Each parallel string needs its own resistor, because LEDs do not share current evenly. The 12 V example with 3 white LEDs in series and 2 strings needs 2 (one per string) of 120 Ω.
- Read the result. Use the standard value at or above the exact one, so the current never goes above your target. The example is 350 Ω exactly, so 360 Ω, with 19.44 mA and bands Orange, Blue, Brown, Gold.
Frequently asked questions
- How do I calculate the resistor for an LED?
- Subtract the LED's forward voltage from the supply voltage and divide by the current in amps: R = (Vs − Vf) ÷ I. For 9 V, 2 V and 20 mA, that is 7 V ÷ 0.02 A = 350 Ω. The resistor drops the voltage the LED does not use.
- Why use the next higher standard resistor value?
- Resistors are made in E-series values, and a higher resistance gives a slightly lower current, which is the safe direction. With 350 Ω needed, the next E24 value is 360 Ω, giving 19.44 mA (−2.78%) instead of 20 mA. The LED is a little dimmer, never overdriven.
- What is the forward voltage of an LED?
- It depends on the chip material and so on the color. Typical figures at about 20 mA are 1.2 V for infrared, 2.0 V for red and orange, 2.1 V for yellow, and around 3.2 V for blue, white and bright green. Datasheets give ranges: Vishay lists 2.0 V typical and 2.6 V maximum for its red and orange AlInGaP parts. These are typical values, so use the datasheet of your actual LED when you have it.
- Which E-series should I choose, E12 or E24?
- E24 has 24 values per decade (±5%) and E12 has 12 (±10%). E24 sits closer to the exact value, so it gets nearer to your target current. In the example, E24 gives 360 Ω and E12 gives 390 Ω, with 17.95 mA. The tolerance also moves the real current by a few percent.
- How do I wire several LEDs?
- In series, the forward voltages add and one resistor sets the current for the chain: three 3.2 V LEDs on 12 V need (12 − 9.6) ÷ 0.02 = 120 Ω, giving 120 Ω and 80% efficiency. In parallel, give every string its own resistor: LEDs differ slightly in forward voltage, so one shared resistor can let one LED hog the current. Two such strings draw 40 mA in total.
- What power rating does the resistor need?
- The resistor dissipates P = I² × R, which is also the voltage across it times the current. The example resistor dissipates 0.136 W. The tool doubles that for a margin (0.272 W, so 1/2 W or larger) and rounds up to a standard rating such as 1/8 W, 1/4 W or 1/2 W.
- What happens if the supply is lower than the LED voltage?
- No useful current flows: the LED never reaches its forward voltage, so there is nothing for a resistor to limit and the tool shows an error. For example: The supply (3 V) must be higher than the LEDs' total forward voltage (1 × 3.2 V = 3.2 V), or no current flows. Raise the supply or use fewer LEDs in series. Even when the supply is only a little higher, the current becomes very sensitive to the LED's actual forward voltage, so the tool warns when less than 1 V is left for the resistor.
- Why is the efficiency so low?
- A series resistor turns the unused voltage into heat. The LED gets Vf × I and the supply provides Vs × I, so efficiency is Vf ÷ Vs: 22.2% for 2 V from 9 V, and 40% from 5 V. Putting more LEDs in series, or using a constant-current driver, wastes less.
- Are my numbers sent anywhere?
- No. The calculation runs in your browser and nothing you type is sent to a server or saved.
How it works
The voltage across the resistor is the supply minus the number of LEDs in series times the forward voltage. The exact resistance is that voltage divided by the current in amps. The standard value is the smallest E12 or E24 value (IEC 60063) at or above the exact one, using the same lists as the resistor color code tool, so the current never exceeds your target. The actual current is the resistor voltage divided by the standard value, power in the resistor is current squared times resistance, and the recommended rating is twice that, rounded up to a standard wattage (1/16, 1/8, 1/4, 1/2, 1, 2, 3, 5 or 10 W). LED power is forward voltage times current; efficiency is the power in all LEDs divided by the power taken from the supply. With parallel strings, each string has its own resistor and the supply current is the string current times the number of strings. The forward voltage is a typical figure and is assumed constant: a real LED varies from part to part and with current and temperature, so the actual current is an estimate, and resistor tolerance (±5% or ±10%) adds to that. Supply voltages above 100 V, currents above 1 A and more than 50 LEDs in series are outside the range of this tool. Everything runs in your browser and nothing you type is sent anywhere.
Sources
- Vishay TLHK46Q1R2 datasheet: red AlInGaP LED, forward voltage 2.0 V typical, 2.6 V maximum at 20 mA
- Vishay: LED physics (visible LED materials, bandgap and forward voltage)
- Kingbright LED catalog (typical forward voltage of blue and white LEDs)
- E series of preferred numbers (IEC 60063), Wikipedia
- Ohm's law, Wikipedia
More free tools
- Resistor Color Code CalculatorRead 3, 4, 5 and 6 band resistor colors (IEC 60062) or turn a value into bands, check it against the E-series, and decode SMD codes including EIA-96.
- Ohm's Law CalculatorEnter any two of voltage, current, resistance and power to get the other two, with SI prefixes. Plus series/parallel, LED resistor and voltage divider.
- Battery Life CalculatorEstimate how long a battery lasts from its capacity (mAh, Ah or Wh) and load, with a usable-capacity setting and duty cycle. Or find the capacity needed.
- Voltage Divider CalculatorResistor divider output voltage from Vin, R1 and R2, or the R1 and R2 for a target Vout, with E12/E24/E96 values, load effect, current and power.
- Electrical Box Fill CalculatorCheck electrical box fill under NEC 314.16: count conductors, grounds, clamps, devices and loops, compare with the box volume, and see pass or fail.
- Feet and Inches CalculatorAdd, subtract, multiply and divide lengths like 5' 7 3/8" with exact fractions, rounded to 1/16 inch, plus decimal feet, mm and cm and a tape view.