HomeCalculatorsElectricalSemiconductorLED Resistor Calculator
Electrical calculator

LED Resistor Calculator

Size the series resistor for one or more LEDs: R = (Vs − n·Vf) / If.

Instant result
Result

Enter values to calculate.

Inputs
Mode
Formula
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Engineering assurance
Input interpretation
Enter values to calculate.
Result
Assurance
Engineering
Declared partition coverage
PASS · 3/3 declared partitions (single-led, multi-led, invalid-domain) · Matrix
Known limitations
  • Ideal Vf; no temperature derating
  • Core CVP does not include live graph, viewport, or pointer interaction.
Model
Series LED current-limiting resistor and powers.
Scope
Constant Vf; DC
Verification
Engine tested · Source checked · v1.0.0 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Engineering assurance· View Manifest · CVP overview · Specification
Versions
Calculation 1.0.0 · CVP protocol 1.0.0-proposed
CVP identity
2/2 property · digest 0c6fc27b432a
Legacy regression
7/7 tests · Production surface contract 4/4
Reference
O1 model · O2 expected_values · O2 numerical_behavior
Interfaces
PASS · UI (SSR) / REST / MCP — ui-ssr is query-result HTML, not a live browser session.
Supplemental domain review
Internal · Pass · electrical-engineer
Named expert review
Not performed
CVP suite
2/2 golden · 3/3 CVP boundary · 2/2 invalid · 2/2 property · 1/1 cross-interface · 1/1 CVP contract · Manifest
Sources
  • LED manufacturer application notes — Series resistor sizing
  • Horowitz & Hill — The Art of Electronics — LED drive
Sources
Evidence
2 legacy golden · 3 legacy boundary · legacy regression suite · 2/2 oracle-backed golden · 2/2 invalid · Artifact integrity PASS · CalculatorX electrical review
This calculator CURRENT · Public schema 1.0.0 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓
Semantic contract
PASS
Full verification

Manifest identity, reference classes, interfaces, suite, and production records.

Formulas

Core equations used by this calculator.

ResistanceR = (Vs − n·Vf) / If
iDC idealization; ignores LED Vf temperature drift and PWM averaging.

How to use

1

Enter supply voltage Vs

Must be greater than the LED forward drop (n·Vf).

2

Enter LED Vf and target current If

If > 0. Optional n is the number of series LEDs (integer ≥ 1).

3

Read series resistor R

R = (Vs − n·Vf) / If. Pick the next standard resistor at or above the calculated value.

Example calculations

Common configurations with formula and result.

ϟ

5 V · 2 V · 20 mA

Single LED

R=(5−2)/0.02
150 Ω

LED Resistor calculator specification

Version 1.0.0 · Engine tested · Supplemental domain review · Internal · 2026-08-08

Calculation status

Review policy · Evidence · Reviewed by CalculatorX electrical review (electrical-engineer)

Definition
A series resistor sets LED current: R = (Vs − n·Vf) / If. Also reports resistor and LED power.
What it calculates
Series LED current-limiting resistor and powers.
Inputs
  • Vs, Vf, If > 0
  • optional integer n≥1
Outputs
  • R_ohm
  • P_R_W
  • P_led_W
  • V_led
  • n
Formula
R=(Vs−n·Vf)/If
Assumptions
  • Constant Vf; DC
Units
  • V, A, Ω, W
Boundary conditions
  • Vs ≤ n·Vf → SUPPLY_TOO_LOW
  • n not positive int → N_MUST_BE_POSITIVE_INT
Example
5V, 2V, 20mA → 150Ω
Validation cases

1 published on this page · 7/7 tests · Production surface contract 4/4 · View evidence

  • 5,2,0.02 → R=150
Sources
  • LED manufacturer application notes — Series resistor sizing
    Supports: R=(Vs−Vf)/If
  • Horowitz & Hill — The Art of Electronics — LED drive
    Supports: Series ballast from supply minus Vf
Last reviewed
2026-08-08
Reviewed by
CalculatorX electrical review (electrical-engineer)
Calculation version
1.0.0

Background

Interpretation and common distinctions.

Size a series LED resistor.

Default: 5 V · Vf=2 V · 20 mA → 150 Ω.

Agent / API notes

Capability id: electrical.led_resistor · tool id: led-resistor · pin 1.0.0.

Errors: SUPPLY_TOO_LOW, N_MUST_BE_POSITIVE_INT, VALUE_MUST_BE_POSITIVE.

}

Frequently asked questions

Key distinctions behind the calculation.

What if Vs ≤ n·Vf?

API returns SUPPLY_TOO_LOW — the LED string cannot forward-bias.