Skip to content
Other

LM317 Voltage Regulator Calculator

The LM317 is an adjustable linear voltage regulator. Set the mode to calculate either the output voltage from your resistor values, or the resistor R2 needed to hit a target voltage. A third mode handles the current-limiter circuit. The calculator also shows power dissipation and a curve of output voltage across a sweep of R2 values.

Your details

Choose what you want to solve for. In voltage-regulator modes R1 is the upper resistor (between OUT and ADJ); R2 is the lower resistor (between ADJ and GND).
The three variants share the same resistor formula but differ in maximum output current.
The resistor between the OUTPUT pin and the ADJ pin. TI recommends 240 Ω as the standard value to keep minimum load current around 5 mA.
Ω
The resistor between the ADJ pin and GND. Increasing R2 raises the output voltage.
Ω
The unregulated DC supply fed into the INPUT pin. Must be at least 3 V above Vout for the LM317 to regulate correctly.
V
The current drawn by your load. Used for power-dissipation and efficiency calculations.
A
Output voltage (Vout)High dissipation - heatsink required
5.036V

Regulated DC output voltage

Required R2-
Sense resistor (R_sense)-
Power dissipated by IC3.48W
Efficiency0.4%
Heatsink needed?Yes - high dissipation (> 2 W), use a heatsink
Dropout marginOK - margin is 6.96 V (need >= 3 V)
3.48 W
No heatsink<0.5Optional0.5-1Heatsink recommended1-2Heatsink required2+
08.5117.02015003000
R2 (Ω)

Output voltage: 5.036 V

  • The IC dissipates 3.48 W as heat. Add a heatsink to prevent thermal shutdown.
  • Efficiency is 42.0%. Linear regulators convert the Vin - Vout gap directly into heat, so a lower input voltage means higher efficiency.

Next stepAdd a 0.1 uF ceramic capacitor on the input and a 1 uF tantalum capacitor on the output to suppress oscillations.

Formula

Vout=Vref(1+R2R1)+IADJR21.25(1+R2R1),R2=VoutVrefVrefR1+IADJ,Rsense=1.25IlimitV_{out} = V_{ref}\left(1 + \frac{R_2}{R_1}\right) + I_{ADJ} \cdot R_2 \approx 1.25\left(1 + \frac{R_2}{R_1}\right), \quad R_2 = \frac{V_{out} - V_{ref}}{\frac{V_{ref}}{R_1} + I_{ADJ}}, \quad R_{sense} = \frac{1.25}{I_{limit}}

Worked example

Target: 9 V output from a 12 V supply. With R1 = 240 ohm: R2 = (9 - 1.25) / (1.25/240 + 50e-6) = 7.75 / 0.005271 = 1471 ohm. Nearest E24 value is 1500 ohm, giving Vout = 1.25*(1 + 1500/240) = 9.06 V. At 0.5 A load, Pd = (12 - 9) * 0.5 = 1.5 W, so a small heatsink is recommended.

What is the LM317 and how does it work?

The LM317 is an adjustable three-terminal positive linear voltage regulator produced by Texas Instruments and many second-source manufacturers. Unlike fixed regulators such as the 7805, the LM317 produces any voltage from 1.25 V to 37 V using just two external resistors. Internally it maintains a constant 1.25 V reference voltage (Vref) between its OUTPUT pin and its ADJ (adjustment) pin, regardless of input voltage or load current. By placing a resistor divider from OUTPUT to ADJ to GND, you set the ratio that determines the output voltage. The device then drives as much current as needed to maintain that reference across R1, which in turn forces a proportional voltage across R2.

How to use this calculator

Three modes cover the most common design tasks. In "Find Vout" mode you enter R1 and R2 and get the regulated output voltage, power dissipation, and efficiency. In "Find R2" mode you enter the target output voltage and R1 to get the resistor value you need - round the result to the nearest standard E24 or E96 value, then verify using Find-Vout mode. In "Current-limiter" mode the LM317 is wired with only one sense resistor between the OUTPUT and ADJ pins; the formula simplifies to R_sense = 1.25 / I_limit, and the calculator also tells you the minimum power rating for that resistor. All modes also compute the power the IC must dissipate as heat, and whether your input voltage is high enough above the output to stay out of dropout.

Resistor selection, capacitors, and practical tips

Texas Instruments recommends R1 = 240 ohm as the standard value. This keeps the minimum load current (Imin = Vref/R1 = 1.25/240 = 5.2 mA) at a level that satisfies the LM317's quiescent current requirement without wasting too much power. R1 values between 100 ohm and 1000 ohm are acceptable; smaller values improve accuracy slightly but increase quiescent dissipation. A 0.1 uF ceramic capacitor on the input pin and a 1 uF tantalum on the output suppress high-frequency oscillations. If the input capacitor is more than 15 cm from the IC, add a 10 uF electrolytic. An optional 10 uF on the ADJ pin improves ripple rejection by about 15 dB. A protection diode from output to input protects the IC when the output capacitor is larger than about 25 uF.

Thermal management and heatsink guidance

The LM317 in a standard TO-220 package has a thermal resistance of about 65 C/W junction-to-ambient in free air. Power dissipated by the IC is Pd = (Vin - Vout) x Iload. At 1.5 A with a 5 V drop, the IC must shed 7.5 W, which demands a heatsink rated below 8 C/W to keep the junction under 125 C at 25 C ambient. As a practical rule of thumb, plan for a heatsink whenever Pd exceeds 1 W. Use thermal paste between the IC and heatsink, and remember that the metal tab of the TO-220 package is connected to the OUTPUT pin, so the heatsink may be live and needs electrical isolation from any grounded chassis.

LM317 family comparison

DeviceMax output currentMax input voltageTypical dropoutPackage
LM3171.5 A40 V~2.5 VTO-220, TO-92, SOT-223
LM3503.0 A33 V~2.5 VTO-220, TO-3
LM3385.0 A35 V~2.5 VTO-220, TO-3

All three devices use the same resistor formula and 1.25 V reference voltage.

Frequently asked questions

What resistor value should I use for R1?

Texas Instruments recommends 240 ohm as the standard value for R1. This keeps the minimum load current at about 5 mA, satisfying the quiescent current requirement and maintaining regulation accuracy. Values between 100 ohm and 1000 ohm are acceptable, but 240 ohm strikes the best balance between accuracy and efficiency for most designs.

What is the minimum output voltage of the LM317?

The minimum output voltage is 1.25 V, which is the internal reference voltage (Vref) maintained between the OUTPUT and ADJ pins. You cannot regulate below this value with the standard circuit.

How much voltage does the LM317 need above the output to regulate?

The LM317 needs a minimum of approximately 3 V between the INPUT pin and OUTPUT pin to stay in regulation. This is called the dropout voltage. If Vin drops within 3 V of Vout, the output will fall below the set voltage. The LM1117 or AMS1117 are better choices when you need a dropout below 1.5 V.

Can the LM317 work as a constant-current source?

Yes. Connect a single sense resistor between the OUTPUT pin and the ADJ pin, and leave the ADJ pin disconnected from any load return. The LM317 will regulate the voltage across that resistor to 1.25 V, forcing a constant current of I = 1.25 / R_sense through the load. This is commonly used for battery charging and LED driving.

What is the difference between the LM317, LM350, and LM338?

All three are adjustable positive regulators with the same 1.25 V reference and the same resistor formula. They differ only in maximum output current: LM317 delivers up to 1.5 A, LM350 up to 3 A, and LM338 up to 5 A (with 7 A peak transient). Use the same calculator for all three, then choose the package that fits your current budget.

Why is the efficiency of the LM317 so low?

The LM317 is a linear regulator, meaning it burns the voltage difference between input and output as heat. Efficiency is simply Vout/Vin. For a 5 V output from a 12 V supply, efficiency is only 5/12 = 42%. If efficiency matters, consider a switching regulator (buck converter) instead, which can achieve 85-95% efficiency.

What capacitors should I add to an LM317 circuit?

At minimum, add a 0.1 uF ceramic capacitor between the INPUT pin and GND, and a 1 uF tantalum or ceramic capacitor between the OUTPUT pin and GND. These suppress oscillations that can occur when the input supply has inductance (e.g. long wires). Adding a 10 uF electrolytic on the ADJ pin improves ripple rejection by about 15 dB, and a 10 uF bulk capacitor on the output improves transient response.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…