Resistor for a 3.3V red LED at 20 mA
Worked answer for a 3.3V rail (ESP32 / Pi GPIO) driving a red LED (typical Vf ≈ 2V) at 20 mA.
Use a 68Ω E24 standard value · 1/8 W or higher
| Supply voltage (Vs) | 3.3V |
| LED forward voltage (Vf) | ≈ 2 V (red) |
| Target current (I) | 20 mA |
| Exact resistor R = (Vs−Vf)/I | 65.0 Ω |
| Nearest E24 (rounded up) | 68Ω |
| Actual current with 68Ω | 19.1 mA (≤ target — safe) |
| Resistor dissipation | 25 mW |
| Recommended power rating | 1/8 W (≥ 2× dissipation) |
The resistor is rounded up to the nearest E24 standard value, so the real current (19.1 mA) stays at or below your 20 mA target — the safe direction for the LED.
Different values? Change the supply, LED color or current in the interactive tool:
Open the LED Resistor Calculator →Read the guides: LED current-limiting resistor: theory & sizing · LED forward voltage chart by color
Disclaimer: This is a reference estimate using a typical forward voltage for the color. Confirm Vf and the maximum current against your LED's datasheet before building.