Why an LED needs a resistor
A light-emitting diode does not behave like a light bulb. Below its forward voltage, almost no current flows; just above it, the current shoots up. Connected straight to a battery or power supply, an LED will draw far more current than it can handle and burn out. A series resistor limits the current to a safe value.
The formula
The resistor takes up the voltage the LEDs do not use:
R = (V_supply − n × V_forward) ÷ I
where n is the number of LEDs in series and I the current in amperes (20 mA = 0.020 A). The resistor dissipates P = V_R² ÷ R as heat.
Because resistors come in standard values, the calculator rounds up to the next value of the E12 series (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 and their multiples) and shows the current you will actually get.
Worked examples
A red LED (2.0 V) at 20 mA on a 5 V supply:
| Result | Value |
|---|---|
| Exact resistor | 150 Ω |
| Standard value | 150 Ω |
| Power in the resistor | 0.060 W |
| Power used by the LED | 0.040 W |
Three white LEDs (3.1 V each) in series on 12 V at 20 mA need (12 − 9.3) ÷ 0.02 = 135 Ω. The next E12 value is 150 Ω, which gives 18 mA and about 0.05 W in the resistor.
Typical forward voltages
| LED color | Forward voltage |
|---|---|
| Red | 1.8 to 2.2 V |
| Orange, yellow | 2.0 to 2.2 V |
| Green (modern) | 2.8 to 3.4 V |
| Blue, white | 2.8 to 3.4 V |
| Infrared | 1.2 to 1.6 V |
Always check the datasheet: values vary by manufacturer and by current.
Choosing the current
Standard 5 mm indicator LEDs are often rated for 20 mA maximum, but modern LEDs are bright at 5 to 10 mA. Running below the maximum extends their life and saves power, which matters on battery-powered projects.
Tips
- Round the resistor up, never down: a little less current is safe, a little more is not.
- Choose a resistor rated for at least twice the power it dissipates.
- Give each parallel branch its own resistor.
- For high-power LEDs (350 mA and up), use a constant-current driver instead of a resistor.