How to choose an LED resistor
An LED must never be connected straight to a battery or a power supply. A resistor sets the current.
Step by step
- Supply voltage Vs: the battery or supply you use.
- LED voltage Vf: from the LED's data sheet, for the current you want.
- LED current I: the data sheet gives a maximum. Many people choose a lower value than the maximum for a longer life.
- Resistor: R = (Vs − Vf) / I.
- Standard value: the next value above R in E12 or E24, so the current is slightly lower than planned.
- Power: P = I² × R. Choose a resistor with more than twice this power rating.
Worked examples
| Case | Target current | Exact resistor | Next E12 value | Real current | Resistor power |
|---|---|---|---|---|---|
| 5 V supply, 1 LED of 2 V | 10 mA | 300 Ω | 330 Ω | 9.091 mA | 27.27 mW |
| 9 V supply, 1 LED of 2.2 V | 20 mA | 340 Ω | 390 Ω | 17.44 mA | 118.6 mW |
| 12 V supply, 3 LEDs of 3.2 V | 20 mA | 120 Ω | 120 Ω | 20 mA | 48 mW |
| 3.3 V supply, 1 LED of 2 V | 5 mA | 260 Ω | 270 Ω | 4.815 mA | 6.259 mW |
Common mistakes
- No resistor. The LED takes whatever current the supply can give and can fail at once.
- Using milliamps in the formula. 15 mA is 0.015 A.
- Wrong forward voltage. Different colours and models have different Vf. Look it up.
- Supply barely above Vf. The current then changes a lot with small changes of voltage. Leave a margin of at least a volt or so, or use a constant-current driver.
Several LEDs
In series, add the forward voltages and use the same resistor formula, and note that the supply must be higher than the total. In parallel, each LED needs its own resistor.
Can I use a lower resistor to make the LED brighter?
A lower resistor means more current, and above the rating the LED is damaged or its life drops.
What about LED strips?
Strips have their resistors built in and need the supply voltage printed on them.
This is an independent guide. It is not connected with any standards body or company named here. The formulas are the usual textbook ones; the colour code, E-series and AWG values are those printed in common references, because the standards IEC 60062, IEC 60063 and ASTM B258 are paid documents that we did not read. Tables and examples were calculated with Python on 14 November 2026. Check data sheets and local safety rules before you build.