DevToolsHub Free · Fast · 100% in your browser

LED Resistor Calculator

Calculate the series resistor value and power rating for one or more LEDs.

Exact resistance500 Ω
Nearest E24 (higher)510 Ω
Actual LED current19.61 mA
Resistor power196.08 mW (use ≥ 1/2 W)
Total power235.29 mW
Efficiency16.67 %

R = (Vs − n × Vf) / I. Typical Vf: red 2.0 V, yellow/green 2.1 V, blue/white 3.2 V.

About this LED resistor calculator

Find the current-limiting resistor for one or more LEDs in series, including the nearest standard E24 value, the actual current with that value and the resistor wattage you need. An LED must never be connected straight to a supply: a series resistor sets the current using Ohm's law, R = (V_supply − V_forward) / I. Works for a single LED, a string of LEDs in series and parallel strings, from 3.3 V and 5 V logic supplies (Arduino, Raspberry Pi, ESP32) up to 12 V and 24 V automotive and lighting circuits.

How to use the LED Resistor Calculator

  1. Enter the supply voltage (3.3 V, 5 V, 9 V, 12 V, 24 V or any value).
  2. Enter the LED forward voltage and desired current (from the datasheet, or use the typical values below) and the number of LEDs in series.
  3. Read the exact resistor, the nearest standard E24 value, the actual current and the minimum resistor power rating.

Example

12 V, red LED 2.0 V, 20 mA           →  R = (12 − 2) / 0.02 = 500 Ω → 510 Ω (E24), 0.2 W → use ¼ W or ½ W
5 V, blue LED 3.2 V, 20 mA           →  90 Ω → 91 Ω, 0.036 W → ¼ W
3.3 V, green LED 2.1 V, 10 mA        →  120 Ω, 0.012 W
12 V, 3 × white 3.2 V in series, 20 mA →  (12 − 9.6) / 0.02 = 120 Ω, 0.048 W

Frequently asked questions

What resistor do I need for an LED?

R = (supply voltage − LED forward voltage) ÷ LED current. For a typical red LED on 5 V at 20 mA: (5 − 2) ÷ 0.02 = 150 Ω. Round up to the next standard value and use at least a ¼ W resistor.

What is the forward voltage of red, green, blue and white LEDs?

Typical 5 mm indicator LEDs: infrared 1.2 to 1.6 V, red 1.8 to 2.2 V, orange and yellow 2.0 to 2.2 V, green 2.0 to 3.2 V (older green about 2.1 V, bright green 3.0 V), blue 3.0 to 3.4 V, white 3.0 to 3.6 V, UV 3.3 to 3.8 V. Always check the datasheet when you have it.

What resistor for an LED on 5 V, 12 V, 3.3 V or 9 V?

At 20 mA with a 2 V red LED: 3.3 V → 68 Ω, 5 V → 150 Ω, 9 V → 360 Ω, 12 V → 510 Ω, 24 V → 1.1 kΩ. For a 3.2 V blue or white LED: 5 V → 91 Ω, 9 V → 300 Ω, 12 V → 470 Ω, 24 V → 1 kΩ. For Arduino and Raspberry Pi GPIO pins use 220 to 330 Ω to keep pin current low.

Why round up to the next standard value?

A higher resistance keeps the current at or below the target, protecting the LED. Resistors are sold in E12 and E24 series (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 and their decades), so 500 Ω is not available but 510 Ω or 560 Ω is.

What wattage resistor do I need for an LED?

Power = (V_supply − V_LED) × I, or I² × R. On 12 V with a 2 V LED at 20 mA that is 10 V × 0.02 A = 0.2 W, so a ¼ W resistor would run hot; choose ½ W. The calculator recommends a rating with a safety margin.

Can I connect LEDs in series with one resistor?

Yes, as long as the sum of the forward voltages is less than the supply voltage by at least 1 to 2 V. Three 3.2 V white LEDs need 9.6 V, so they work on 12 V with a single resistor. Enter the number of LEDs and the tool does the maths.

Can I connect LEDs in parallel with one resistor?

Avoid it. Small differences in forward voltage mean one LED takes most of the current and burns out first. Give each parallel LED (or each series string) its own resistor instead.

Do I really need a resistor for an LED?

Yes, unless you are using a constant-current LED driver. Without a resistor the current is limited only by the supply and the LED's own resistance, which is tiny, so the LED overheats and fails within seconds, often taking a GPIO pin with it.

Is my data safe?

Yes. The tool runs entirely in your browser using WebAssembly. Nothing you type or upload is sent to a server, logged or stored.

Is it free?

Yes, completely free with no sign-up, no limits and no watermarks. It also works offline once the page has loaded.

An unhandled error has occurred. Reload ✕