LED Resistor Calculator
Find the resistor to put in series with one LED, and see why.
How it works
An LED will take as much current as it can get, so you add a resistor to limit it. The resistor “uses up” the extra voltage: supply minus the LED’s forward voltage. Divide that by the current you want and you get the resistance. Then pick the next standard size up. Bigger resistor = dimmer and safer.
R = (Vsupply − Vf) ÷ I · actual current I = (Vsupply − Vf) ÷ Rstd · resistor power P = I² × Rstd
Worked example
A red LED (Kingbright WP7113ID: Vf typ 1.9 V at 10 mA, max DC current 30 mA) on a 3.3 V ESP32 pin at 10 mA: (3.3 − 1.9) ÷ 0.010 = 140 Ω. Next standard value up: 150 Ω (E12 and E24). Actual current ≈ 9.33 mA, resistor power ≈ 13 mW.
Sources: Kingbright WP7113ID datasheet · Vishay E-series values (IEC 60063) · Espressif ESP32-C6 datasheet v1.5, Table 5-4. Educational tool; always check your parts’ datasheets.