LED Resistor Calculator

Enter any 3 of supply voltage, LED forward voltage, forward current or resistance — the calculator solves for the 4th.

Vsupply n/a R n/a I(F) n/a LED n/a GND
V
V
mA
Ω

Enter exactly 3 of the 4 values to solve for the 4th.

Formula, typical values & edge cases
R = (Vsupply − Vf) / IF

Rearranged for each variable:
IF     = (Vsupply − Vf) / R
Vf     = Vsupply − IF × R
Vsupply = Vf + IF × R

Power dissipated in the resistor: P = (Vsupply − Vf) × IF

1Worked example: 9V supply, red LED (Vf ≈ 2V), 20mA target current → R = (9−2) / 0.02 = 350Ω, dissipating 0.14W.

Typical LED forward voltages (Vf): Red ≈ 1.8–2.2V, Yellow/Orange ≈ 2.0–2.2V, Green ≈ 2.0–3.2V, Blue/White ≈ 2.8–3.4V. Reference: Vishay Semiconductors, "Physics of Optoelectronic Devices" application note, Table 1 (typical technology characteristics by LED chemistry/color). These are typical ranges across manufacturers, not a single fixed value — always check the specific LED's own datasheet for an exact number.

Edge cases: Vsupply must exceed Vf or no current flows (flagged explicitly). A 0Ω resistor when solving for current is a direct short, not a valid current-limiting circuit (flagged explicitly). Negative inputs are rejected — none of these quantities are meaningfully negative in this context.
Common questions

Why does an LED need a resistor at all?

LEDs don't obey Ohm's Law — past their forward voltage, resistance drops sharply and current would climb uncontrolled, destroying the LED almost instantly if connected directly to a supply. The resistor limits current to a safe level.

What forward current should I target?

20mA is a common safe default for standard 5mm LEDs, but always check the specific LED's datasheet — high-brightness and surface-mount LEDs often have different maximum ratings.

What happens if I use a bigger resistor than calculated?

A larger resistor reduces current below the target, making the LED dimmer but safer. A smaller resistor increases current above the target, risking overheating or destroying the LED — when in doubt, round up, not down.