If you connect an LED straight to a supply with no resistor, the current shoots up in an instant and burns it out. Once an LED is on, its voltage stays almost constant, so a resistor is needed to take up the leftover voltage and set the current. Enter the supply voltage, the LED's forward voltage, and the current you want in the calculator above, and it gives you the matching resistance, the nearest standard resistor value, and the actual current and heat.
The formula
When an LED and a resistor are in series, the voltage across the resistor is the supply voltage minus the LED's forward voltage (Vf). Apply Ohm's law to that.
R = (supply voltage - Vf) / target current
For example, to light a red LED (Vf about 2.0 V) at 10 mA from a 5 V supply, R = (5 - 2.0) / 0.01 = 300Ω. 300 Ω is in the E24 standard values, so you can use it as is.
Round the standard value up
When the calculated value is not exactly among the standard resistor values, it is safer to pick the larger one. A bigger resistor only lowers the current a little and makes the LED slightly dimmer, while a smaller one goes over the target current. The calculator also suggests the rounded-up value by default and recalculates the actual current for you.
Forward voltage by LED color (approximate)
| LED type | Vf (approx.) |
|---|---|
| Red, orange, yellow | 1.8 – 2.2 V |
| Standard green | 2.0 – 2.4 V |
| Blue, white, high-brightness green | 2.8 – 3.4 V |
| Infrared (IR) | 1.2 – 1.5 V |
Even for the same color, values differ between products, so the value in the datasheet is the most accurate. If the supply is 3.3 V and the LED is blue (Vf around 3.2 V), almost no voltage falls across the resistor and the current becomes unstable. For such a combination, it is better to raise the supply voltage or use a constant-current circuit.
Things to know
- Give each LED its own resistor. If you put several LEDs in parallel on one resistor, current crowds into the LED with slightly different characteristics, so brightness varies and one can fail.
- You can put several in series. It is fine as long as the sum of all the Vf values is well below the supply voltage. Enter the total in the calculator's Vf box.
- Check the current limit. A typical 3 or 5 mm indicator LED is limited to around 20 mA continuous. Around 10 mA is bright enough for most.
- Check the heat too. Resistor heat is
voltage × current. A 1/4 W resistor is enough for most cases, but if the current is large, follow the recommended rating the calculator shows.
More related explanation is in the guides LED Current-Limiting Resistors and Brightness Control and Driving Seven-Segment Displays.