Skip to tool content
Toolioz logoToolioz

LED Resistor and Voltage Divider Calculator

An LED resistor calculator uses R = (Vs − n×Vf) / I. Power is I²R. Parallel strings multiply current. A second tab solves a two-resistor divider: Vout = Vin × R2/(R1+R2). 12 V and 5 V supplies are common inputs, not the only ones.

Quick Summary & Direct Answer
Electronics

What resistor does a 5 V LED need?

A 2.1 V LED at 20 mA on 5 V needs (5 − 2.1) / 0.02 = 145 Ω, dissipating 0.058 W, so a 150 Ω ¼ W part is typical. Two LEDs in series on 5 V leave only 0.8 V and may not light.

Key Takeaways

  • Series count subtracts more Vf.
  • If drop ≤ 0 the supply is too low.
  • Divider tab is independent Ohm’s law.

Series resistor

145 Ω

Watts0.058
Drop2.9 V
Total current20 mA

Results can be wrong. This calculator is unofficial. Figures can be incomplete, rounded, or not updated. Use them at your own risk and check a tape, datasheet, ball band, or official chart before cutting, mixing, buying, or publishing. 145 Ω is the exact Ohm’s-law value. Buy the next standard E12/E24 resistor up (often 150 Ω) and check the LED datasheet Vf. Limits of liability are in the terms of service.

Frequently asked questions

This page treats parallel as separate strings each with the same R, not one resistor feeding mismatched Vf.

Publisher notes · reviewed 29 October 2026

Leftover voltage over current is the resistor

R = (Vs − n×Vf) / I. Power I²R. Parallel strings multiply current. The divider tab is Vout = Vin × R2/(R1+R2). Datasheet Vf depends on colour.

One resistor, many parallels

This page does not recommend one resistor feeding paralleled LEDs with mismatched Vf. Use strings.

Worked examples

  • 5 V, 2.1 V, 20 mA

    145 Ω, 0.058 W; a 150 Ω ¼ W part is typical.

Limits of this page

  • Constant-current drivers are not modelled.
  • PWM average current is not entered unless you type it.

Sources