LM317 Voltage Regulator Calculator
Electronics
- The LM317 holds 1.25 V between output and adjust pin, so the divider current is set by R1 = 240 ohm.
- Scale by the divider ratio: 1.25 x (1 + 1,000/240) = 6.46 V.
- Add the adjust-pin current term: 50 uA through R2 adds 50.00 mV.
- The output voltage is 6.51 V.
The LM317 has survived since 1976 because it reduces a regulated power supply to three parts: the regulator itself and two resistors. It holds a precise 1.25 V between its output and adjust pins, and the resistor divider across those pins decides what multiple of 1.25 V appears at the output.
This calculator evaluates the full datasheet equation, Vout = 1.25 (1 + R2/R1) + Iadj x R2, including the small adjust-pin current term that simplified formulas drop. It also reports the current flowing through R1, the number that tells you whether the divider alone satisfies the regulator's minimum load requirement.
The examples use the classic R1 value of 240 ohms and the also-common 120 ohms, and show exactly how much error the Iadj term adds as R2 grows, from a negligible correction at low outputs to a full 100 mV at the highest example.
Worked examples
240 and 1000 ohm for 6.5 V
(240 ohm · 1000 ohm · 50 uA)
| Output voltage Vout | 6.51 V |
| Ideal output (Iadj ignored) | 6.46 V |
| Iadj contribution | 50.00 mV |
| Current through R1 | 5.21 mA |
120 and 720 ohm for 8.8 V
(120 ohm · 720 ohm · 50 uA)
| Output voltage Vout | 8.79 V |
| Ideal output (Iadj ignored) | 8.75 V |
| Iadj contribution | 36.00 mV |
| Current through R1 | 10.42 mA |
240 and 2000 ohm for 11.8 V
(240 ohm · 2000 ohm · 50 uA)
| Output voltage Vout | 11.77 V |
| Ideal output (Iadj ignored) | 11.67 V |
| Iadj contribution | 100.00 mV |
| Current through R1 | 5.21 mA |
How the LM317 divider sets the output
Inside the package, a bandgap reference and an error amplifier drive the pass transistor until the voltage between the output pin and the adjust pin equals 1.25 V. Connect R1 between those pins and a fixed current, 1.25 / R1, flows through it. That same current, plus the tiny adjust-pin current, flows through R2 to ground, and the voltage across R2 adds to the 1.25 V to form the output.
The adjust-pin current is only about 50 microamps, roughly one hundredth of the divider current with R1 = 240 ohms, which is why it is often ignored. But it flows through R2, so its voltage contribution grows with R2: at 1000 ohms it adds 50.00 mV, and at 2000 ohms a full 100.00 mV, as the third example shows.
- Vout = 1.25 (1 + R2/R1) + Iadj x R2
- Iadj is typically 50 uA, specified under 100 uA
- R1 = 240 ohm gives a divider current of 5.21 mA
The Iadj term and when it matters
Ignoring Iadj underestimates every output, and the error is proportional to R2. For a 3.3 V rail built with small resistors the error is a few millivolts and irrelevant. For a 24 V output with R2 in the tens of kilo-ohms it reaches several hundred millivolts, enough to matter in a battery charger or a reference supply.
There is a second reason to keep R1 small: the Iadj current varies somewhat with input voltage and temperature, so any output error it causes also drifts. A stiff divider, R1 of 120 to 240 ohms, swamps that variation. Designs that raise R1 to save quiescent current trade away exactly this stability, and the calculator's R1-current readout shows the trade numerically.
Worked example: 240 ohm and 1000 ohm for about 6.5 V
With R1 = 240 ohms and R2 = 1000 ohms the divider ratio is 4.167, the ideal output is 1.25 x 5.167 = 6.46 V, and the Iadj term adds 50 uA x 1000 ohms = 50.00 mV, giving 6.51 V. The current through R1 is 5.21 mA, comfortably above the LM317's minimum load current of a few milliamps, so the regulator stays in regulation even with nothing else connected.
The second example halves R1 to 120 ohms and sets R2 = 720 ohms: the ideal output is 8.75 V, Iadj adds 36.00 mV, and the result is 8.79 V with a divider current of 10.42 mA. The third stretches R2 to 2000 ohms on the 240 ohm base, reaching 11.77 V, and shows the Iadj contribution at its largest here, 100.00 mV, nearly a percent of the output.
| Example | R1 | R2 | Ideal | With Iadj |
|---|---|---|---|---|
| 1 | 240 ohm | 1000 ohm | 6.46 V | 6.51 V |
| 2 | 120 ohm | 720 ohm | 8.75 V | 8.79 V |
| 3 | 240 ohm | 2000 ohm | 11.67 V | 11.77 V |
Choosing R1: minimum load and quiescent current
The LM317 needs a minimum load current, typically 3.5 mA and up to 10 mA worst-case, or its output drifts upward at light load. The divider is the load that never disconnects, so designers size R1 to draw that current by itself: 1.25 V across 240 ohms gives 5.21 mA, and across 120 ohms gives 10.42 mA, covering even the worst-case specification.
Battery-powered designs resent that standing current, and the LM317 is simply the wrong part for them; modern low-quiescent regulators exist for that niche. For bench supplies, chargers and retrofits, the few milliamps are a fair price for a regulator that is nearly indestructible and available everywhere.
A complete bench supply around the calculation
The two resistors set the voltage, but a working supply needs the supporting parts the datasheets insist on: an input capacitor close to the package, an output capacitor for stability and transient response, and protection diodes when large output capacitors could discharge back through the regulator at switch-off. None of these change the setpoint this calculator computes; all of them decide whether the circuit reaches it cleanly.
Replacing R2 with a potentiometer makes the classic adjustable bench supply, 1.25 V up to the dropout limit. The wiper resistance then plays the R2 role in the formula, and the Iadj term explains the small non-linearity users notice at the top of the adjustment range.
Thermal design: the other half of the datasheet
A linear regulator converts every volt of input-output difference times the load current into heat. Dropping 12 V to the first example's 6.51 V at 1 A dissipates about 5.5 W in the package, far beyond what a bare TO-220 can shed. The heatsink calculation is as mandatory as the resistor calculation, and it is why switching regulators displaced the LM317 wherever efficiency or current is high.
Thermal shutdown protects the part from destruction, not the design from failure: a supply that cycles in and out of shutdown under load is a design error, not a feature. Work out the worst-case dissipation first, then choose the package and heatsink.
The LM317 family: fixed cousins and the negative twin
The same architecture produced the 78xx fixed regulators, which move the divider inside the package and sell the setpoint as a part number, and the LM337, the negative-output twin of the LM317 for split supplies. Audio and instrumentation designs still pair an LM317 with an LM337 to build tracking bipolar rails, a job modern integrated solutions have not entirely taken over.
Higher-current variants in the same lineage, and low-dropout descendants with different references, all inherit the divider idea. Once you can set an LM317's output from first principles, the whole family's datasheets read as variations on one theme: a reference, a divider and a pass element.
Troubleshooting a supply that misses its setpoint
When a built supply reads high at no load, suspect the minimum load first: measure the divider current against the 5.21 mA or 10.42 mA the design intended, because an R1 accidentally fitted ten times too large is the classic assembly error and produces exactly that symptom.
When it reads low under load but correct unloaded, the cause is thermal or dropout, not the divider: check the input-output difference at full current and the heatsink temperature. The setpoint equation is the last place to look, because two resistors at room temperature are the most reliable parts in the circuit.
Limits: dropout voltage, heating and line regulation
The LM317 needs roughly 3 V of headroom between input and output to regulate; below that the output sags and ripple breaks through. It is not a low-dropout regulator, and using it from a 5 V rail to make 3.3 V is outside its design envelope. Input ripple and line changes are rejected by 60 dB or more when the headroom is respected.
Finally, the 1.25 V reference itself has a tolerance, typically plus or minus a few percent across production. Precision designs trim R2 or select the reference grade; the formula gives the nominal centre of that distribution.
FAQs
What output do R1 = 240 ohm and R2 = 1000 ohm give?
1.25 x (1 + 1000/240) = 6.46 V ideal, plus 50.00 mV from the adjust-pin current, for 6.51 V. The divider current is 5.21 mA, enough to meet the minimum load on its own.
Why is R1 usually 240 ohm?
It sets a divider current of 1.25 / 240 = 5.21 mA, safely above the LM317 minimum load current across production spread. The 120 ohm alternative doubles that to 10.42 mA for worst-case margin.
How much does the Iadj term add with R2 = 720 ohm?
50 uA x 720 ohm = 36.00 mV, lifting the ideal 8.75 V to 8.79 V. The term is small but systematic, and it grows linearly with R2.
What R2 gives about 11.77 V with R1 = 240 ohm?
R2 = 2000 ohm: the divider gives 11.67 V and the Iadj term adds 100.00 mV. At this level the correction is nearly one percent of the output and worth including.
Can the LM317 output go below 1.25 V?
No, 1.25 V is the internal reference floor for the standard circuit. Lower outputs need a different topology, such as offsetting the adjust pin below ground or choosing a regulator with a lower reference.
Does the input voltage affect the output calculation?
Not the setpoint, but the input must exceed the output by the dropout margin, about 3 V, or regulation is lost. Input voltage also sets the power dissipation together with the load current.