LED Resistor Calculator
Find the correct resistor for any LED — resistance, standard E24 value, power dissipation, and 4-band color code. Results update instantly.
How to Choose the Right Resistor for an LED
Every LED requires a current-limiting resistor to prevent it from drawing too much current and burning out. LEDs are diodes — without a resistor, they will allow as much current as the power supply can provide, which almost always destroys them within seconds. This calculator uses Ohm's law to find the exact resistance you need, then maps it to the nearest real-world standard value from the E24 resistor series.
The Core Formula
The resistance required for a single LED in series with a power supply is:
R = (Vs − Vf) ÷ I
Where Vs is the supply voltage (e.g., 5V from a USB source, 3.3V from a microcontroller GPIO, or 12V from a wall adapter), Vf is the LED's forward voltage (the voltage it "uses"), and I is the target operating current in amps. Most standard indicator LEDs are designed for 20mA (0.020A); running at 10mA extends their life and is still clearly visible in most applications.
Forward Voltage by LED Color
The forward voltage of an LED depends primarily on the semiconductor material used to produce the light. Red and infrared LEDs use lower band-gap materials and have Vf in the range of 1.2V to 2.0V. Green, blue, white, and UV LEDs use wide band-gap materials like gallium nitride and require 2.8V to 3.5V. The values used in this calculator are typical midpoints — always check your specific LED's datasheet for the rated Vf at your target current, especially for precision circuits or high-power applications.
Series vs. Parallel Configurations
When you wire LEDs in series, the forward voltages add together. Three red LEDs in series consume 3 × 1.8V = 5.4V of forward voltage. The remaining voltage must be dropped across the resistor. Series wiring ensures each LED receives the same current, which means matched brightness. The formula becomes R = (Vs − n×Vf) ÷ I. If the supply voltage is not high enough to accommodate all the series LED voltages, this calculator will flag the error.
Parallel wiring keeps the voltage across each LED the same but multiplies the current. If you use a single resistor for n parallel LEDs, the resistor must carry n times the per-LED current. This approach is generally discouraged in precision applications because small differences in Vf between LEDs cause uneven current sharing — one LED may take most of the current. For production designs, give each parallel LED its own resistor. This calculator handles the single-resistor parallel case for quick prototyping: R = (Vs − Vf) ÷ (n×I).
Choosing the Right Standard Resistor (E24 Series)
After calculating the exact resistance, you need to find a physically available resistor. Resistors are manufactured in standardized value sets called E-series. The E24 series provides 24 values per decade (powers of 10), spaced roughly 10% apart on a logarithmic scale. The values in each decade are: 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91 — then scale up by multiplying by 10 for the next decade (100, 110, 120...). This calculator always rounds up to the nearest E24 value, which results in slightly less current than the target — safer for the LED than rounding down.
Power Dissipation and Resistor Wattage Rating
The resistor converts the excess voltage into heat. Power dissipation is P = I² × R, or equivalently P = (Vs − Vf) × I. For a typical 5V supply with a red LED and 20mA current: P = (5 − 1.8) × 0.020 = 64mW. A standard 1/4W (250mW) resistor handles this comfortably. However, with a 12V supply and a single red LED at 20mA: P = (12 − 1.8) × 0.020 = 204mW — still within 1/4W but getting close. At 30mA or more on a 12V supply, you will exceed 250mW and should use a 1/2W or 1W resistor. This calculator warns you automatically when the power exceeds 250mW.
Reading the 4-Band Resistor Color Code
Through-hole resistors are marked with colored bands that encode their resistance value. A 4-band resistor uses bands 1 and 2 for the first two significant digits, band 3 as a multiplier (power of 10), and band 4 for tolerance. The color-to-digit mapping is: Black=0, Brown=1, Red=2, Orange=3, Yellow=4, Green=5, Blue=6, Violet=7, Gray=8, White=9. For tolerance: Gold=±5%, Silver=±10%, Brown=±1%. For example, a 160Ω resistor is Brown (1), Blue (6), Brown (×10), Gold (±5%) — reading left to right with the tolerance band nearest the right end.
Practical Tips for LED Circuits
For microcontroller projects (Arduino, Raspberry Pi, ESP32), use a 330Ω resistor for red/orange/yellow LEDs on 5V pins and a 100Ω to 150Ω resistor for blue/white/UV LEDs. GPIO pins typically supply 3.3V or 5V at up to 40mA, but it is best practice to keep LED current below 20mA to protect the pin. For 3.3V systems with red LEDs, the available voltage headroom is only 1.5V; with 20mA that is 75Ω — round up to 82Ω from the E24 series. Remember that the forward voltage in the datasheet is specified at a particular current; Vf rises slightly as current increases and drops as temperature rises, so build in a small margin.