LM317 Calculator

Calculate LM317 regulator output voltage from R1 and R2, and the R2 needed for a target voltage.

Loading calculator…

What this tool does

Calculate LM317 regulator output voltage from R1 and R2, and the R2 needed for a target voltage. Uses the datasheet's nominal 1.25 V reference and ignores the small Iadj term (≈50 µA × R2). The regulator also needs roughly 3 V of headroom and a minimum load to regulate.

How to use the LM317 Calculator

  1. Enter or select resistor r1 (ohms).
  2. Enter or select resistor r2 (ohms).
  3. Enter or select target output voltage (v).
  4. Read the calculated result; change any measurement to compare alternatives.

Formula

Vout = 1.25 × (1 + R2 ÷ R1); required R2 = R1 × (Vtarget ÷ 1.25 − 1)
r1
Resistor R1 (ohms)
r2
Resistor R2 (ohms)
target
Target output voltage (V)

Uses the datasheet's nominal 1.25 V reference and ignores the small Iadj term (≈50 µA × R2). The regulator also needs roughly 3 V of headroom and a minimum load to regulate.

Worked example

For lm317 calculator, the following measurements illustrate the exact method: Resistor R1 (ohms): 240; Resistor R2 (ohms): 720; Target output voltage (V): 5.

Inputs

  • Resistor R1 (ohms)240
  • Resistor R2 (ohms)720
  • Target output voltage (V)5

Result

  • Output voltage (V)5
  • R2 required for target voltage (ohms)720
  • Divider current through R1 (mA)5.21

Results explained

Output voltage (V)
Output voltage (V) from the formula above. Uses the datasheet's nominal 1.25 V reference and ignores the small Iadj term (≈50 µA × R2). The regulator also needs roughly 3 V of headroom and a minimum load to regulate.
R2 required for target voltage (ohms)
R2 required for target voltage (ohms) from the formula above. Uses the datasheet's nominal 1.25 V reference and ignores the small Iadj term (≈50 µA × R2). The regulator also needs roughly 3 V of headroom and a minimum load to regulate.
Divider current through R1 (mA)
Divider current through R1 (mA) from the formula above. Uses the datasheet's nominal 1.25 V reference and ignores the small Iadj term (≈50 µA × R2). The regulator also needs roughly 3 V of headroom and a minimum load to regulate.

Frequently asked questions

Vout = 1.25 × (1 + R2 ÷ R1), plus a small Iadj × R2 term (Iadj ≈ 50 µA) that most designs ignore. R1 = 240 Ω and R2 = 720 Ω give exactly 1.25 × 4 = 5.0 V.

The LM317 needs a minimum load current (typically 5–10 mA) to regulate. 1.25 V across 240 Ω draws about 5.2 mA through the divider, meeting that minimum from the divider alone.

Rearrange: R2 = R1 × (Vtarget ÷ 1.25 − 1). For 9 V with R1 = 240 Ω, R2 = 240 × 6.2 = 1,488 Ω — use 1.5 kΩ and accept about 9.06 V.

About 3 V above the output (the dropout voltage), and the difference times the load current is dissipated as heat in the package — check heatsinking for large drops or currents.

The LM317 regulates 1.25 V between its output and adjust pins (the internal bandgap reference), so the divider ratio multiplies that fixed 1.25 V to set any output from 1.25 V up to about 37 V.