How do you calculate the output voltage of an LM317?
Use Vout = 1.25 V × (1 + R2 / R1) + IADJ × R2, with IADJ about 50 µA. R1 = 240 Ω and R2 = 715 Ω give 5.01 V. Keep the input at least 3 V above the output, and check the heat: the regulator burns (Vin − Vout) × Iload, and at 25 °C a TO-220 with no heat sink can shed only about 1.72 W to 4.26 W, depending on the copper around it.
LM317 output voltage formula
The LM317 holds 1.25 V between its OUTPUT and ADJUST pins. R1 sits across that reference, so it sets a constant current; the same current, plus the small ADJUST current, flows through R2 and lifts the ADJUST pin above ground.
Vout = VREF × (1 + R2 ÷ R1) + IADJ × R2
- Vout
- output voltage in V
- VREF
- 1.25 V typical (1.2 V to 1.3 V over line, load and temperature)
- R1
- resistor from OUTPUT to ADJUST, in Ω
- R2
- resistor from ADJUST to ground, in Ω
- IADJ
- ADJUST pin current, 50 µA typical and 100 µA maximum
The LM317 equation rearranged for R2 with a chosen R1:
R2 = (Vout − VREF) ÷ (VREF ÷ R1 + IADJ)
The regulator passes the load and the R1 current, so its dissipation (equation 9 of the data sheet) and junction temperature are:
PD = (Vin − Vout) × (Iload + VREF ÷ R1) + Vin × IADJ TJ = TA + PD × RθJA
- PD
- power dissipated in the regulator, in W
- TA
- ambient temperature in °C
- RθJA
- junction-to-ambient thermal resistance in °C/W
Worked examples
Example 1: 5 V from a 12 V supply at 500 mA
With R1 = 240 Ω, R2 = (5 − 1.25) ÷ (1.25 ÷ 240 + 50 µA) = 713 Ω. The nearest E96 value is 715 Ω, which gives 5.01 V. The input is 6.99 V above the output, so the 3 V headroom is met. The regulator burns 3.53 W, and on TI’s JEDEC-board figure for a TO-220 KCS (23.5 °C/W) at 25 °C the junction reaches 108 °C. With no heat sink or board copper (58 °C/W) the same power would need 230 °C, so give this design a heat sink.
Example 2: the best E24 pair for 12 V
Searching R1 from 100 Ω to 330 Ω, the closest E24 pair for 12 V is R1 = 130 Ω and R2 = 1.1 kΩ, giving 11.88 V (-0.98%). With 1 % resistors and the data sheet’s reference limits, the output can sit anywhere from 11.15 V to 12.63 V.
Example 3: how much current from 24 V in a SOT-223?
With a 5.01 V output, the differential is 18.99 V. A new-chip SOT-223 (59.6 °C/W) at 40 °C ambient can shed (125 − 40) ÷ 59.6 = 1.43 W, so the maximum load is 69.8 mA. For more current, lower the input voltage or use a switching regulator.
LM317 resistor table: R2 for common output voltages with R1 = 240 Ω
LM317 resistor values with the typical 50 µA ADJUST current counted in the exact R2. The output columns show what each standard resistor actually gives.
| Output | Exact R2 | Nearest E24 | Output (E24) | Nearest E96 | Output (E96) | Minimum input |
|---|
| 1.8 V | 105 Ω | 100 Ω | 1.776 V | 105 Ω | 1.802 V | 4.8 V |
| 2.5 V | 238 Ω | 240 Ω | 2.512 V | 237 Ω | 2.496 V | 5.5 V |
| 3.3 V | 390 Ω | 390 Ω | 3.301 V | 392 Ω | 3.311 V | 6.3 V |
| 5 V | 713 Ω | 680 Ω | 4.826 V | 715 Ω | 5.01 V | 8 V |
| 6 V | 903 Ω | 910 Ω | 6.035 V | 909 Ω | 6.03 V | 9 V |
| 9 V | 1.47 kΩ | 1.5 kΩ | 9.137 V | 1.47 kΩ | 8.98 V | 12 V |
| 12 V | 2.04 kΩ | 2 kΩ | 11.77 V | 2.05 kΩ | 12.03 V | 15 V |
| 15 V | 2.61 kΩ | 2.7 kΩ | 15.45 V | 2.61 kΩ | 14.97 V | 18 V |
| 24 V | 4.33 kΩ | 4.3 kΩ | 23.86 V | 4.32 kΩ | 23.97 V | 27 V |
LM317 power dissipation limit by package
PD(max) = (125 °C − TA) ÷ RθJA. The RθJA values are from TI’s LM317 data sheet, on a JEDEC test board, so a sparse PCB does worse. The no-heat-sink row is the top of the 22 to 58 °C/W that TI’s SLVA118A gives for a TO-220 with no airflow. The legacy and new chips have different dies, so check which one your part is.
| Package | RθJA | PD(max) at 25 °C | PD(max) at 50 °C | PD(max) at 70 °C |
|---|
| TO-220 KCS on a JEDEC board, legacy chip | 23.5 °C/W | 4.26 W | 3.19 W | 2.34 W |
| TO-220 KCT on a JEDEC board, legacy chip | 37.9 °C/W | 2.64 W | 1.98 W | 1.45 W |
| TO-220, no heat sink or board copper | 58 °C/W | 1.72 W | 1.29 W | 948 mW |
| TO-263 KTT, legacy chip | 38 °C/W | 2.63 W | 1.97 W | 1.45 W |
| TO-263 KTT, new chip | 41 °C/W | 2.44 W | 1.83 W | 1.34 W |
| SOT-223 DCY, new chip | 59.6 °C/W | 1.68 W | 1.26 W | 923 mW |
| SOT-223 DCY, legacy chip | 66.8 °C/W | 1.5 W | 1.12 W | 823 mW |
What goes wrong in practice
Heat is the usual limit. Dropping 7 V at 500 mA is 3.5 W. On TI’s JEDEC-board figure a TO-220 KCS runs near 107 °C at 25 °C ambient, but with no heat sink or board copper that power is a rise of up to 203 °C, far past the limit, so it needs a heat sink. Surface-mount packages rely on copper: TI’s LM317-N data sheet quotes 74 °C/W for a SOT-223 on 1 oz copper and 59.6 °C/W on 2 oz, and says a TO-263 does not improve much beyond 1 square inch. A large drop at high current belongs on a switching regulator, or a switcher followed by an LM317 for low noise.
Connect R1 directly at the OUTPUT pin, not at the far end of a long trace, so trace resistance is not multiplied by the divider ratio. A 10 µF capacitor from ADJUST to ground improves ripple rejection, and TI recommends protection diodes when CADJ or a large output capacitor is used. This LM317 output voltage calculator is DC and steady state: it does not cover start-up, load transients or the safe-area current fold-back at high differential.
Glossary
- Reference voltage (VREF)
- The 1.25 V the LM317 holds between OUTPUT and ADJUST.
- ADJUST current (IADJ)
- About 50 µA that flows out of the ADJUST pin and through R2, adding a small error to the output.
- Headroom
- The input-to-output voltage difference. The LM317 data sheet recommends at least 3 V.
- Dropout
- When the input is too close to the output for the regulator to hold regulation; the output then follows the input.
- Minimum load
- The current the regulator must pass to stay in regulation, 3.5 mA typical and 10 mA maximum.
- RθJA
- Thermal resistance from junction to ambient, in °C per watt, measured on a specified test board.
Frequently asked questions
What is the LM317 output voltage formula?
The LM317 formula is Vout = 1.25 V × (1 + R2 / R1) + IADJ × R2, where R1 runs from OUTPUT to ADJUST and R2 from ADJUST to ground. IADJ is about 50 µA, so the last term is small but not zero: with R1 = 240 Ω and R2 = 715 Ω it adds 35.8 mV and the output is 5.01 V.
What resistors do I need for 5 V from an LM317?
With R1 = 240 Ω the exact R2 is 713 Ω once the ADJUST current is counted. The nearest E96 value is 715 Ω, giving 5.01 V; the nearest E24 value is 680 Ω, giving 4.826 V. The LM317 resistor calculator above does this for any output above 1.25 V and up to 37 V.
What is the R2 value for 12 V with R1 = 240 Ω?
The exact value is 2.04 kΩ. The nearest E96 resistor, 2.05 kΩ, gives 12.03 V.
Why is R1 usually 240 Ω?
The 1.25 V reference across 240 Ω drives 5.21 mA, which is above the 3.5 mA typical minimum load, so the regulator stays in regulation with nothing else connected. The guaranteed minimum load is 10 mA at 40 V differential; R1 = 120 Ω (10.4 mA) covers that case.
What is the LM317 dropout voltage, and what input voltage does it need?
TI specifies an input-to-output differential of 3 V to 40 V, so the input should be at least the output plus 3 V. A 5 V output needs about 8 V at full current. With less headroom the output can drop out and follow the input.
Can an LM317 really deliver 1.5 A?
Only in a narrow range. The 1.5 A minimum current limit applies up to 15 V of differential, and the limit falls to a minimum of 0.15 A at 40 V. Heat usually sets a lower number first: at 25 °C a TO-220 on TI’s JEDEC test board (23.5 °C/W) can shed about 4.26 W, which is 1.5 A at only 2.84 V of differential, and with no heat sink or board copper it can be as little as 1.72 W.
Why is my LM317 output not exactly what I calculated?
The reference is 1.25 V typical but can be 1.2 V to 1.3 V, the resistors add their tolerance, and the ADJUST current adds up to 100 µA through R2. With R1 = 240 Ω, R2 = 715 Ω and 1 % resistors the worst-case range is 4.704 V to 5.323 V.
How do you calculate LM317 power dissipation?
PD = (Vin − Vout) × (Iload + VREF ÷ R1) + Vin × IADJ, and the junction then reaches TJ = TA + PD × RθJA. In example 1 (5 V from a 12 V supply at 500 mA), the regulator burns 3.53 W.
Does this work as an LM317T calculator?
Yes. The LM317T is the LM317 in a TO-220 package, so the same formula applies. Choose one of the TO-220 options in the package list.
More free PCB tools
See all free electronics tools →
- Inrush current calculatorPeak inrush current into input capacitors, the limiting resistor or soft-start time you need, and the energy it dissipates.
- Wire voltage drop calculatorVoltage drop and power loss along a cable from its gauge, length, current and material, and the gauge that keeps drop in budget.
- Transformer calculatorTurns ratio, secondary voltage and current, reflected impedance and VA rating for an ideal transformer.
- Supercapacitor calculatorHold-up time of a supercapacitor at constant power or current between two voltages, including ESR drop, or the size you need.
- Power factor calculatorReal, reactive and apparent power and power factor, and the capacitor that corrects it to a target power factor.
- Battery pack calculatorVoltage, capacity, energy, maximum current and weight of a series-parallel battery pack from the cell you choose.
Design the whole board, not one number
ProtoFlow is free AI PCB design software: describe a circuit and get a schematic with real parts, PCB layout with an autorouter, SPICE simulation and Gerber files. Native KiCad, Altium and EAGLE import and export. Free on macOS, Windows and Linux.