LM317 Calculator

Calculate the output voltage of an LM317 adjustable regulator from your R1/R2 resistor values, plus power dissipation, program current, and dropout headroom.

Quick Facts

Formula
Vout = Vref × (1 + R2/R1) + Iadj × R2
Vref is nominally 1.25V (datasheet range about 1.20-1.30V) between the OUT and ADJ pins.
Minimum load current
About 3.5-10 mA through R1
R1 around 220-240Ω keeps the divider above this minimum even with a light external load.

Your Results

Calculated
Output voltage (Vout)
-
Vref × (1 + R2/R1) + Iadj × R2
Power dissipation
-
(Vin − Vout) × Iout
Current through R1
-
Vref / R1 - sets minimum load
Dropout headroom
-
Vin − Vout

Ready

Enter R1, R2, and operating conditions, then press Calculate.

About the LM317

The LM317 is a three-terminal adjustable linear voltage regulator (IN, OUT, ADJ). Instead of a fixed output like a 7805, it lets you set any output voltage from about 1.25V up to 37V using two external resistors, R1 and R2. The chip holds a constant reference voltage (nominally 1.25V) between its OUT and ADJ pins, and that reference across R1 sets a current that also flows through R2, producing a predictable, adjustable output.

The standard formula

The datasheet formula for output voltage is:

  • Vout = Vref × (1 + R2 / R1) + Iadj × R2
  • Vref is the reference voltage between OUT and ADJ — nominally 1.25V (datasheet spread roughly 1.20-1.30V).
  • R1 is the fixed resistor between OUT and ADJ, commonly 220Ω or 240Ω.
  • R2 is the adjustable resistor between ADJ and ground, chosen to set your target voltage.
  • Iadj is the small current that leaks out of the ADJ pin, typically about 50µA. Because this term is tiny compared to Vref × (1 + R2/R1), many quick designs approximate it as zero.

Two other numbers that matter

Voltage alone does not tell you whether a design will actually work. Two more checks matter in practice:

  • Minimum load current. The LM317 needs roughly 3.5-10mA flowing through R1 and R2 to bias its internal reference. If your real load plus the R1/R2 divider draws less than that, the output can drift high. Keeping R1 near 220-240Ω is the standard way to guarantee the divider alone supplies enough current.
  • Dropout headroom. Vin must sit above Vout by roughly 2-3V at rated current or the regulator falls out of regulation and the output sags. Any extra headroom above that minimum is dissipated as heat inside the package, calculated as (Vin − Vout) × Iout.

Choosing R2 for a target voltage

To solve for R2 given a desired output, rearrange the formula (ignoring the small Iadj term for a first pass): R2 = R1 × (Vout / Vref − 1). For example, with R1 = 240Ω and a 5V target, R2 ≈ 240 × (5/1.25 − 1) = 240 × 3 = 720Ω — the default values in this calculator.

Frequently Asked Questions

What is the LM317 output voltage formula?
Vout = Vref × (1 + R2/R1) + Iadj × R2, where Vref is the reference voltage between OUT and ADJ (nominally 1.25V), R1 is the fixed resistor from OUT to ADJ, R2 is the adjustable resistor from ADJ to ground, and Iadj is the adjustment-pin current (about 50µA typical). Since Iadj is tiny, it's often approximated as Vout ≈ Vref × (1 + R2/R1).
What value should R1 be?
Most designs use a fixed R1 of 220Ω or 240Ω. A smaller R1 pulls more current through the resistor divider, keeping the LM317 above its minimum load-current requirement (typically 3.5-10mA) even with a light or disconnected external load, so the output stays in regulation.
Why does the LM317 need a minimum load current?
It needs roughly 3.5-10mA flowing through R1 and R2 to bias its internal voltage reference correctly. If the external load and the R1/R2 divider together draw less than that, the output voltage can rise above the calculated value. Using R1 around 240Ω or less with Vref near 1.25V is the standard way to guarantee enough current.
How much dropout headroom does the LM317 need?
It typically needs about 2-3V between Vin and Vout at full rated current to stay in regulation. If Vin minus Vout falls below that, the output sags below the calculated value. Any headroom above the minimum is dissipated as heat inside the regulator, so more headroom means more power to remove with a heatsink.