Skip to content
Omnikalc

LM317 adjustable regulator calculator

Compute the output voltage of an LM317 regulator from R1 and R2, the R2 needed for a target voltage, the dropout margin and the power the regulator must dissipate.

Updated on
Your inputs
Ω

Value out of range

Ω

Value out of range

V

Value out of range

V

Value out of range

A

Value out of range

Results

Output voltage

5.036 V

Enough input headroom for regulation

R2 needed for the target voltage

1,488 Ω

Regulator power dissipation
3.48 W
Use a heat sink: a TO-220 without one handles only about 1 to 2 W
Efficiency
42 %

The LM317 regulator

The LM317 is a classic three-terminal adjustable linear regulator. It keeps 1.25 V between its output and adjust (ADJ) pins, and two resistors scale that reference to any output from 1.25 V to about 37 V, at up to 1.5 A.

The formula

With R1 between OUT and ADJ, and R2 between ADJ and ground:

Vout = 1.25 × (1 + R2 ÷ R1) + Iadj × R2

Iadj is about 50 µA and usually adds only a few tens of millivolts. To find R2 for a target voltage: R2 = (Vout ÷ 1.25 − 1) × R1.

Example

R1 = 240 Ω and R2 = 720 Ω:

  • Vout = 1.25 × (1 + 3) + 0.00005 × 720 ≈ 5.04 V.

For 9 V with the same R1: R2 = (9 ÷ 1.25 − 1) × 240 = 1,488 Ω, so use 1.5 kΩ, or a 1.2 kΩ resistor plus a 500 Ω trimmer.

Why R1 is usually 240 Ω

The LM317 needs a minimum load current, about 3.5 to 10 mA, to regulate. With R1 = 240 Ω, the divider itself draws 1.25 ÷ 240 ≈ 5.2 mA. Newer designs often use 120 Ω for a guaranteed 10 mA.

Headroom (dropout)

The input must be about 3 V above the output at full current for the LM317 to regulate. For lower headroom, use a low-dropout (LDO) regulator.

Heat

A linear regulator burns the excess voltage as heat:

P = (Vin − Vout) × Iload

From 12 V to 5 V at 0.5 A, the LM317 dissipates about 3.5 W. A TO-220 package without a heat sink handles only about 1 to 2 W, so this design needs a heat sink. Efficiency is only Vout ÷ Vin, about 42% here; for large drops or currents, a switching (buck) converter wastes far less.

Good practice

  • Add a 0.1 µF ceramic capacitor at the input and 1 µF or more at the output.
  • A 10 µF capacitor from ADJ to ground improves ripple rejection; add a protection diode if you do.
  • Place R1 close to the regulator so the reference is not affected by voltage drops in the wiring.
  • The LM317 also makes a simple constant-current source: a single resistor R between OUT and ADJ sets I = 1.25 ÷ R.

Frequently asked questions

What is the LM317 output voltage formula?

Vout = 1.25 × (1 + R2/R1) + Iadj × R2, with Iadj about 50 µA.

What resistors give 5 V from an LM317?

R1 = 240 Ω and R2 = 720 Ω give about 5.04 V.

What is the LM317 dropout voltage?

About 2 to 3 V at full current, so the input must be at least that much above the output.

Does the LM317 need a heat sink?

Above about 1 to 2 W of dissipation, (Vin − Vout) × I, yes.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.