LM317 Voltage Regulator Calculator
LM317 Voltage Regulator Calculator
Set an LM317’s output with R1 and R2, or work backwards from the voltage you want to a real pair of E24 or E96 resistors — with the reference-tolerance spread, the minimum load current, the power it has to get rid of and the junction temperature that follows.
LM317 output, dissipation and Tj
12 V in, R1 = 240 Ω, R2 = 720 Ω, Vref 1.25 V, IADJ 50 µA, 0.5 A load, 23 °C/W, 25 °C ambient
The LM317 output equation
- Vref
- the voltage the regulator holds between OUT and ADJ: 1.25 V typical, 1.20–1.30 V specified (TI SLVS044Z)
- R1
- from OUT to ADJ; it carries Vref ÷ R1 at all times, which is also the minimum load the regulator sees
- R2
- from ADJ to ground; it carries the R1 current plus IADJ
- IADJ
- adjust-pin current, 50 µA typical and 100 µA maximum
- θJA
- junction-to-ambient thermal resistance of the package and its heatsink
Worked example
12 V in, R1 = 240 Ω, R2 = 720 Ω, Vref 1.25 V, IADJ 50 µA, 0.5 A load, 23 °C/W, 25 °C ambient
Vout = 1.25 × (1 + 720 ÷ 240) + 50 µA × 720 = 5.000 + 0.036 = 5.036 V
R1 draws 1.25 ÷ 240 = 5.208 mA — enough for the 3.5 mA typical minimum load, but not for the 10 mA worst case (that needs R1 = 120 Ω, 10.42 mA)
With Vref at its 1.20 V minimum the output is 4.836 V; at 1.30 V it is 5.236 V — about ±4%
PD = (12 − 5.036) × 0.5 = 3.482 W
Tj = 25 + 3.482 × 23 = 105.1 °C, 19.9 °C below the 125 °C limit
Common output voltages with R1 = 240 Ω, Vref 1.25 V, IADJ 50 µA
| Wanted | R2 exactly | Nearest E24 | Output with it | Nearest E96 | Output with it |
|---|---|---|---|---|---|
| 1.8 V | 104.6 Ω | 100 Ω | 1.776 V (-1.34%) | 105 Ω | 1.802 V (+0.12%) |
| 2.5 V | 237.7 Ω | 240 Ω | 2.512 V (+0.48%) | 237 Ω | 2.496 V (-0.15%) |
| 3.3 V | 389.9 Ω | 390 Ω | 3.301 V (+0.02%) | 392 Ω | 3.311 V (+0.34%) |
| 5 V | 713.2 Ω | 680 Ω | 4.826 V (-3.49%) | 715 Ω | 5.010 V (+0.19%) |
| 9 V | 1.474 kΩ | 1.5 kΩ | 9.137 V (+1.53%) | 1.47 kΩ | 8.980 V (-0.23%) |
| 12 V | 2.044 kΩ | 2 kΩ | 11.767 V (-1.94%) | 2.05 kΩ | 12.030 V (+0.25%) |
| 15 V | 2.615 kΩ | 2.7 kΩ | 15.447 V (+2.98%) | 2.61 kΩ | 14.974 V (-0.17%) |
| 24 V | 4.326 kΩ | 4.3 kΩ | 23.861 V (-0.58%) | 4.32 kΩ | 23.966 V (-0.14%) |
Setting and cooling an LM317
The LM317 is not a fixed regulator with a divider bolted on; it is a floating regulator that does exactly one thing — it holds its reference voltage, nominally 1.25 V, between its output pin and its adjust pin, and it will move the output wherever it must to keep doing that. Put R1 between OUT and ADJ and a fixed current Vref ÷ R1 flows through it — 5.208 mA with the data sheet’s 240 Ω. That current runs on into R2, together with the small current the adjust pin itself pushes out, so the voltage across R2 is (Vref ÷ R1 + IADJ) × R2 and the output sits Vref above it. That is the whole equation: Vout = Vref × (1 + R2 ÷ R1) + IADJ × R2. The adjust-pin term is small but not nothing — at 5.036 V it contributes 36 mV, 0.71% of the output.
What the tolerance really costs. TI’s data sheet (SLVS044Z) specifies Vref as 1.20 V minimum, 1.25 V typical and 1.30 V maximum over the full operating range — a ±4% band, not a fixed 1.25 V. With R1 = 240 Ω and R2 = 720 Ω that alone moves the output between 4.836 V and 5.236 V. Resistor tolerance adds to it: the ratio of two ±1% resistors can be 2% out, and only the part of the output above Vref depends on that ratio, so ±1% parts add about ±1.50% here. A nominal 5 V rail from an LM317 with ±1% resistors is really about 4.76–5.31 V worst case. If you need better than that, buy a fixed regulator with a trimmed reference, or measure and trim. Choosing E96 rather than E24 resistors is worth doing — the table above shows E24 parts missing by up to 3.49% on their own — but it does not fix the reference.
The minimum load, and where the 240 Ω comes from. An LM317 needs a minimum current flowing out of it to stay in regulation; with no load at all the output drifts up. The data sheet gives that minimum as 3.5 mA typical and 10 mA maximum at a 40 V differential. R1 provides it for free: 240 Ω draws 5.208 mA, which covers the typical figure and is what the data sheet’s own application circuit uses, but not the 10 mA worst case. R1 = 120 Ω draws 10.42 mA and does cover it, at the cost of twice the divider dissipation and half the resistance available for R2. The usual compromise is to keep 240 Ω where the load never falls to zero, and drop to 120 Ω for a supply that must behave with its output open.
Heat is the real limit. Everything the regulator drops becomes heat: P = (Vin − Vout) × Iout. The default case — 12 V in, 5.036 V out at 0.5 A — dissipates 3.482 W, which on a 23 °C/W path from a 25 °C room puts the junction at 105.1 °C. The chart shows the same input driving lower and lower output voltages: below about 3.3 V the dissipation passes what this heat path can carry. A bare TO-220 in still air is nearer 50 °C/W, and at 1.5 A from 12 V to 5 V it would need to shed 10.45 W — impossible without a real heatsink. Size the heatsink with the heatsink calculator, compare the loss with a modern low-dropout part on the LDO loss and thermal calculator, and if the drop and the current are both large use a switching regulator: the buck converter designer sizes one.
Dropout and the 40 V limit. The LM317’s specified operating range starts at a 3 V input-to-output differential, so it cannot make 3.3 V from 5 V — that is an LDO’s job. At the other end the input may never be more than 40 V above the output, so this example tops out at 45 V in. Both limits are checked above. For the simplest regulator of all, and its much worse regulation, see the zener regulator calculator; to work out the divider ratio on its own, the voltage divider calculator.
Frequently asked questions
How do you calculate LM317 resistor values?
Vout = 1.25 × (1 + R2/R1) + IADJ × R2, so R2 = (Vout − 1.25) ÷ (1.25/R1 + IADJ). With R1 = 240 Ω and IADJ = 50 µA, 5 V needs R2 = 713.2 Ω; the nearest E96 value, 715 Ω, gives 5.010 V and the nearest E24 value, 680 Ω, gives 4.826 V.
Why is R1 240 ohms on an LM317?
It sets the current the regulator always has flowing: 1.25 ÷ 240 = 5.2 mA. That meets the 3.5 mA typical minimum load, so the output stays in regulation with nothing connected. TI’s data sheet allows the minimum load to be as high as 10 mA, which needs R1 = 120 Ω (10.4 mA).
What is the minimum input voltage for an LM317?
About 3 V above the output: the data sheet specifies operation for 3 V ≤ Vin − Vout ≤ 40 V. A 5 V output therefore needs at least 8 V in. Below the differential the part drops out and the output follows the input.
How much power does an LM317 dissipate?
(Vin − Vout) × Iout. 12 V in, 5.036 V out at 0.5 A is 3.482 W, which on a 23 °C/W thermal path from 25 °C ambient puts the junction at 105.1 °C.
How accurate is an LM317 output voltage?
The reference alone is specified as 1.20–1.30 V, about ±4%. Add the resistor tolerance — the ratio of two 1% parts can be 2% out — and a nominal 5 V rail is really about ±5% worst case. Use E96 resistors and, if you need better, trim or choose a fixed regulator.
Can an LM317 output less than 1.25 V?
Not on its own: with R2 = 0 the output is the reference voltage itself, about 1.25 V. Lower outputs need the adjust pin pulled below ground by a negative supply, or a different regulator.
Related calculators
References
- Texas Instruments. LM317 3-Pin Adjustable Regulator, SLVS044Z, April 2025. Reference voltage 1.2 / 1.25 / 1.3 V, adjustment-pin current 50 µA typical and 100 µA maximum, minimum load current 3.5 mA typical and 10 mA maximum, 3 V ≤ VI − VO ≤ 40 V.
- STMicroelectronics. LM217, LM317: 1.2 V to 37 V adjustable voltage regulators, DS0433. Reference voltage 1.2 / 1.25 / 1.3 V; maximum input-to-output differential 40 V.
- IEC 60063:2015. Preferred number series for resistors and capacitors (the E6, E12, E24, E48, E96 and E192 series). International Electrotechnical Commission.
- Horowitz P, Hill W. The Art of Electronics, 3rd ed. Cambridge University Press, 2015. Chapter 1 (resistors in series and parallel, reactance, resonance, zener regulators) and Chapter 9 (voltage regulators).
