The LM317 is a three-terminal adjustable linear regulator that holds a constant 1.25 V between its output and adjust pins. Put a resistor R1 across that 1.25 V and a second resistor R2 from the adjust pin to ground, and the output becomes 1.25 × (1 + R2/R1). It is one of the most widely used regulators in hobby and industrial electronics — simple, robust and adjustable from 1.25 V up to near the input voltage. Like any linear regulator it dissipates the input-output difference as heat, so power and heatsinking matter.
Reviewed: June 19, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: Texas Instruments / onsemi LM317 datasheets.
The LM317 formulas
R1 is normally 240 Ω so the adjust divider always draws about 5 mA — the LM317's minimum load to stay in regulation. The output can be set anywhere from 1.25 V (R2 = 0) upward, limited at the top by the input voltage minus the ~3 V dropout.
Worked example — a 9 V regulated rail
Scenario: 9 V output from a 15 V supply at 300 mA, R1 = 240 Ω.
1.8 W needs a small heatsink. Size it with the heatsink calculator. If the input were only 11 V, the 9 V output would still be fine (2 V is below the ~3 V dropout margin — raise the input), which is why headroom matters.
Frequently Asked Questions
Vout = 1.25 × (1 + R2 ÷ R1). 1.25 V is the reference between OUT and ADJ; R1 (≈240 Ω) is the top resistor, R2 sets the voltage. The ~50 µA adjust current is usually neglected.
R2 = R1 × (Vout ÷ 1.25 − 1). With R1 = 240 Ω, 5 V needs R2 = 720 Ω. Use the nearest standard value or a trimmer and check the actual voltage.
The LM317 needs ≈5–10 mA minimum load. With 1.25 V across R1, 240 Ω draws ≈5.2 mA, guaranteeing that load even with nothing connected. 220 Ω is also common.
Pd = (Vin − Vout) × Iout. 12 V→5 V at 500 mA dissipates 3.5 W and needs a heatsink. It also needs ≈3 V dropout, so Vin > Vout + 3 V.
About 3 V more than the output (its dropout). For 5 V out, the input must be at least ≈8 V. Too little headroom drops it out of regulation; too much wastes power as heat.