LM317 adjustable-voltage calculator

R1 connects OUTPUT to ADJUST; R2 connects ADJUST to ground. Enter decimals or scientific notation. Changing a unit reinterprets the number.

Enter R1 and R2 to see the output voltage.

R1 connects OUTPUT to ADJUST; R2 connects ADJUST to ground.

Show the steps

Interactive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.

Calculate the LM317 output voltage from R1 and R2, or R2 for a target voltage, including the adjust-pin current and a check of the input headroom.

How to use

Choose Output voltage to check a pair of resistors, or R2 for a target voltage.

Enter R1, the resistor from OUTPUT to ADJUST, and its unit. The data sheets' typical circuit uses 240 Ω.

Enter R2 and its unit, or the target output voltage.

Keep V_REF at 1.25 V and I_ADJ at 50 μA, or enter your data sheet's values. Set I_ADJ to 0 for the ideal formula.

Optionally enter the input voltage to check headroom. Keep the required headroom at 3 V unless your data sheet allows less at your current.

Read the output or R2, the reference-limit range, the minimum-load and headroom checks and the schematic. Copy result copies the labeled values. Reset restores the starting fields.

Science

The LM317 keeps 1.25 V between its OUTPUT and ADJUST pins. R1 across those pins therefore carries a fixed current, and that current flows on through R2 to ground. The output is the reference plus the voltage across R2.

A small current of about 50 μA also leaves the ADJUST pin and flows through R2, adding I_ADJ × R2 to the output. With R1 = 240 Ω it is under 1 % of the output; with large resistors it matters more.

The reference itself can be anywhere from 1.2 V to 1.3 V across load, line and temperature, so the output can differ from the calculation by about 4 %. Use a trimmer or a precision reference where that matters.

The regulator needs its input above its output by its headroom, up to 3 V at full current and low temperature, and no more than 40 V above it. The headroom check uses the calculated nominal output. Reference and adjust-current variation can require a higher input. It also needs a minimum load, up to 10 mA, or the output rises. A smaller R1 lets the divider supply that current itself. The minimum-load check uses the entered reference voltage, which varies between parts.

Limitations: the tool treats V_REF and I_ADJ as constants and the headroom as a margin you set. It does not model dropout curves, ripple rejection, transient response, current limiting, power dissipation or junction temperature. It suggests no standard resistor values. Rounding R2 down limits the calculated nominal output, not the actual output across component tolerances.

Formulas

Output voltage: V_OUT = V_REF × (1 + R2 ÷ R1) + I_ADJ × R2. V in volts, R in ohms, I_ADJ in amperes.

R2 for a target: R2 = (V_OUT - V_REF) ÷ (V_REF ÷ R1 + I_ADJ).

Programming current: I_R1 = V_REF ÷ R1.

Minimum load from the divider: R1 ≤ V_REF ÷ 10 mA = 125 Ω at 1.25 V.

Headroom: V_IN ≥ V_OUT + headroom; V_IN - V_OUT ≤ 40 V.

Examples

R1 240 Ω, R2 720 Ω: V_OUT = 5.036 V. 1.25 × (1 + 720 ÷ 240) = 5 V, plus 50 μA × 720 Ω = 36 mV. With V_REF from 1.2 to 1.3 V the output is 4.836 V to 5.236 V.

R1 240 Ω, target 12 V: R2 = 2.04437 kΩ. (12 - 1.25) ÷ (1.25 ÷ 240 + 0.00005). Ignoring I_ADJ gives 2.064 kΩ. Rounding down keeps the calculated nominal output at or below 12 V, but tolerances can raise the actual output.

R1 720 Ω, R2 240 Ω: V_OUT = 1.67867 V. R1 and R2 are swapped. The same pair gives 5.036 V the right way round.

5.036 V nominal output from a 7 V input: Nominal headroom 1.964 V. This is below the recommended 3 V, so the output can drop out. The nominal minimum input is 8.036 V. Component tolerances can require more.

R1 100 Ω, R2 3.3 kΩ: V_OUT = 42.665 V. This is above the LM317's 37 V output range.

References

Texas Instruments LM317 3-Pin Adjustable Regulator data sheet (SLVS044Z)

onsemi LM317, NCV317 data sheet (LM317/D)