LED Resistor Calculator
Size the series resistor for one or more LEDs: R = (Vs − n·Vf) / If.
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
- 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
- Horowitz & Hill — The Art of Electronics
- Evidence
- 2 legacy golden · 3 legacy boundary · legacy regression suite · 2/2 oracle-backed golden · 2/2 invalid · Artifact integrity PASS · CalculatorX electrical review
- Semantic contract
- PASS
Full verification
Formulas
Core equations used by this calculator.
How to use
Enter supply voltage Vs
Must be greater than the LED forward drop (n·Vf).
Enter LED Vf and target current If
If > 0. Optional n is the number of series LEDs (integer ≥ 1).
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
LED Resistor calculator specification
Version 1.0.0 · Engine tested · Supplemental domain review · Internal · 2026-08-08
- Engine tested 7/7 tests · Production surface contract 4/4
- Supplemental domain review Internal · Pass · electrical-engineer · 2026-08-08
- Named expert review Not performed
- Calculation version 1.0.0
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 sizingSupports: R=(Vs−Vf)/If
- Horowitz & Hill — The Art of Electronics — LED driveSupports: Series ballast from supply minus Vf
- LED manufacturer application notes — Series resistor sizing
- 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.
Related tools
Other calculators in this family: ADC Error Budget Calculator, Diode Equation Calculator, LDO Thermal Calculator, MOSFET Conduction Loss Calculator, MOSFET Junction Temperature Calculator, MOSFET Switching Loss Calculator, MOSFET Threshold & Overdrive Calculator, MOSFET Total Loss Calculator . Explore all Semiconductor.
Frequently asked questions
Key distinctions behind the calculation.
What if Vs ≤ n·Vf?
API returns SUPPLY_TOO_LOW — the LED string cannot forward-bias.