Electronics
LED Resistor Calculator
The right resistor for your LEDs, rounded up to a value you can buy.
About this tool
The formula
R = (Vsupply โ n ร Vf) รท I. The resistor drops whatever voltage the LEDs don't, and sets the current. The result is rounded up to the next standard value so the LED never gets more current than you asked for.
Forward voltage and current
The colour presets are typical values; your LED's datasheet is the real answer. 20 mA is the classic maximum for 5 mm indicator LEDs, but modern LEDs are bright at 2โ10 mA, which also saves power. Arduino and ESP32 pins should stay well under their own limits (around 20 mA for an Uno pin, less for an ESP32).
Several LEDs
Put LEDs in series with one resistor while the supply allows it. For parallel strings, give every string its own resistor: LEDs don't share current evenly.