Works on this device
Led Resistor Calculator
An LED needs a resistor in series to set its current. Enter the supply voltage, the forward voltage of the LED and the current you want. The tool gives the resistor value, the next standard value to buy, and the current and power you get with it.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose the button below them.
Your result
How it was worked out
How to use this calculator
- Enter the supply voltage, for example 5 V or 12 V. The menu Common supply voltages fills it in for you.
- Enter the forward voltage of the LED (Vf) from its data sheet.
- Enter the current you want, at or below the rated current in the data sheet.
- Choose Calculate. Use the resistor shown as Next value up. The result also shows the real current with that resistor and the power rating the resistor needs.
- The fields for the LED start empty, because every LED type is different. Try an example fills in sample values so that you can see how the tool works.
The LED resistor formula
- Resistor: R = (supply voltage − forward voltage) ÷ LED current.
- Current with a given resistor: I = (supply voltage − forward voltage) ÷ R.
- Power in the resistor: P = (supply voltage − forward voltage) × I. All of it becomes heat.
- Power in the LED: P = forward voltage × I.
- The exact value is seldom a value that is on sale. The tool takes the next standard value up, so the current stays at or below the one you asked for.
Worked examples
5 V supply. An LED with a forward voltage of 2 V is to run at 20 mA. R = (5 − 2) ÷ 0.02 = 150 Ω. This is an E24 value. The resistor turns 3 V × 0.02 A = 0.06 W into heat, so a 0.125 W or 0.25 W part is enough.
12 V supply. An LED with a forward voltage of 3.2 V at 20 mA: R = (12 − 3.2) ÷ 0.02 = 440 Ω. The next E24 value up is 470 Ω. With it the current is 8.8 ÷ 470 = 18.7 mA, and the resistor turns 8.8 V × 0.0187 A = 0.165 W into heat. With a safety margin of 2 it needs a rating of at least 0.33 W.
A resistor you have. A 330 Ω resistor with a 2 V LED on 5 V gives (5 − 2) ÷ 330 = 9.1 mA.
Where to find the forward voltage
The data sheet of the LED gives the forward voltage (Vf) at a test current, and the largest current it may carry. Use those numbers. If you have no data sheet, a multimeter with a diode test, or a small test with a large resistor, shows the forward voltage of the LED in your hand.
The table gives typical ranges only. They are examples to help you check that a number is sensible. They are not values for your LED, and the tool does not fill them in.
| Colour of the LED | Typical forward voltage |
|---|---|
| Infrared | about 1.2 V to 1.6 V |
| Red | about 1.8 V to 2.2 V |
| Yellow, amber, orange | about 2.0 V to 2.2 V |
| Green (older yellow-green types) | about 2.0 V to 2.4 V |
| Pure green, blue, white | about 2.8 V to 3.6 V |
Limits you should know
- This tool is for one LED with its own resistor on a steady DC supply. It does not lay out several LEDs in series or in parallel, LED strips or arrays.
- An RGB LED has three LEDs inside with three different forward voltages. Work out one resistor for each colour.
- When the supply voltage is close to the forward voltage, the current changes a lot with small changes of either. The result warns you when less than a tenth of the supply is across the resistor.
- High-power LEDs (about 1 W and more) need a constant-current driver. A resistor wastes much power and does not hold the current steady as the LED warms up.
- The tool is not for LEDs on mains voltage or on AC. That needs a circuit with proper isolation, designed by a qualified person.
- The example values and the table of typical forward voltages are for trying the tool. This is not professional advice; the data sheet of your LED decides.