LM317 Calculator - V_out, R1, and R2 from the LM317 datasheet
Use this LM317 calculator to find the LM317 output voltage from R1 and R2, or solve R1 or R2 for a target V_out.
LM317 Calculator
Results
What Is an LM317 Calculator?
An LM317 calculator returns the LM317 adjustable regulator output voltage from a pair of programming resistors, or solves the missing resistor for a target output voltage. The LM317 is a three-terminal regulator with a nominal 1.25 V reference between OUT and ADJ.
- • Design a 5 V or 12 V bench supply rail: Pick R1 = 240 ohm and the calculator returns the matching R2 (720 ohm for 5 V, 2.0 kilohm for 12 V).
- • Solve the missing resistor for an arbitrary target: Enter the target V_out between 1.25 V and 37 V and either R1 or R2 to get the other resistor.
- • Check the LM317 headroom and dissipation: Enter the unregulated V_in and the load current to read the headroom and flag when a heat sink becomes necessary.
- • Convert a rail design between regulators: Compare the LM317 output formula against the fixed 7805 / 7812 rails.
The LM317 datasheet sets V_ref at about 1.25 V typical, lists an output range of 1.25 V to 37 V, and limits the input-to-output differential to 40 V. With R1 from OUT to ADJ and R2 from ADJ to ground, the same current through R1 flows through R2 plus the I_ADJ quiescent current, giving V_out = 1.25 (1 + R2/R1) plus a small I_ADJ * R2 error.
The LM317 output formula is the textbook voltage divider V_out = V_ref (1 + R2/R1), so a voltage divider calculator is the natural sanity check when the LM317 reading looks wrong on the bench.
How the LM317 Calculator Works
The LM317 holds a nominal 1.25 V between OUT and ADJ, so the same current through R1 and R2 sets the output by voltage divider. Three modes cover V_out from R1 and R2, R2 from R1 and V_out, and R1 from R2 and V_out.
- V_ref: Reference voltage between OUT and ADJ, 1.25 V typical per the LM317 datasheet.
- I_ADJ: Quiescent current out of the ADJ pin, 50 uA typical, 100 uA maximum.
- R1: Resistor from LM317 OUT to ADJ. 240 ohm keeps about 5 mA through R1.
- R2: Resistor from LM317 ADJ to ground. Sets V_out together with R1.
- V_out: Regulated output voltage, must sit between 1.25 V and 37 V.
- V_in: Unregulated input voltage, must keep at least 3 V above V_out and stay under 40 V.
- I_load: Steady load current used to compute the LM317 dissipation P = (V_in - V_out) * I_load.
The simplified LM317 formula drops the I_ADJ term because typical R2 values produce a sub-100 mV error, but the calculator reports it as I_ADJ * R2. The calculator also computes headroom as V_in - V_out and dissipation as headroom * I_load, with 1 W as the no-heat-sink threshold.
5 V LM317 reference design
R1 = 240 ohm, R2 = 720 ohm, V_in = 9 V, I_load = 100 mA.
V_out = 1.25 (1 + 720 / 240) = 5.0 V; I_ADJ error 0.036 V; power 0.40 W.
V_out = 5.04 V, headroom 3.96 V, power 0.40 W, no heat sink.
5 V rail from the datasheet; a heat sink is unnecessary at 100 mA.
Solve for R2 to get 7.5 V with R1 = 240 ohm
Solve for R2, R1 = 240 ohm, V_out = 7.5 V, V_in = 12 V, I_load = 50 mA.
R2 = 240 * (7.5 / 1.25 - 1) = 1200 ohm.
V_out = 7.50 V, R2 = 1200 ohm, headroom 4.50 V, power 0.23 W, no heat sink.
Heat sink warning at 5 V output and 500 mA load
R1 = 240 ohm, R2 = 720 ohm, V_in = 12 V, I_load = 500 mA.
V_out = 5.04 V; headroom 7 V; power 3.5 W.
V_out = 5.04 V, headroom 6.96 V, power 3.48 W, heat sink recommended.
3.48 W exceeds the 1 W no-heat-sink budget.
According to Wikipedia (LM317), the LM317 uses two external resistors to set V_out = V_ref (1 + R2/R1) + I_ADJ * R2, holds a 1.25 V reference between OUT and ADJ, delivers up to 1.5 A, and lists an output range of 1.25 V to 37 V.
According to Texas Instruments LM317 datasheet (SLVS044), the LM317 output is set by V_out = V_ref (1 + R2 / R1) + I_ADJ * R2 with V_ref = 1.25 V typical, the output range is 1.25 V to 37 V, the input-output differential is 3 V to 40 V, and the ADJ pin typically sinks 50 microampere.
The R1 and R2 ohm pair that sets V_out rides on the same V = I * R identity, so an electrical resistance calculator reads back a missing resistor from a measured V_out and the LM317 1.25 V reference.
Key Concepts Explained
Four short ideas make every number on the result panel easier to interpret.
V_ref and the OUT-ADJ reference
The LM317 holds a nominal 1.25 V between OUT and ADJ using an internal bandgap reference. That voltage sets V_out, with the datasheet treating it as a typical value.
R1 sets the bias current
R1 sees the full V_ref across it, so its value fixes the bias current (about 1.25 V / R1). 240 ohm gives roughly 5 mA, well clear of the datasheet minimum load.
I_ADJ error term
The ADJ pin leaks 50 uA typical and 100 uA worst case, adding I_ADJ * R2 to V_out, at most about 0.1 V for R2 under 2 kilohm.
Vin-Vout headroom and dissipation
The LM317 needs roughly 3 V of headroom and burns (Vin - Vout) * I_load as heat. The Texas Instruments thermal table lists the TO-220 junction-to-ambient resistance around 24 degree C per watt, which sets the 1 W flag.
The dissipation number on the result panel can be read in watts, horsepower, or BTU per hour when sizing a heat sink rating, and a power converter translates between those units without leaving the bench.
How to Use This Calculator
Five steps cover both directions of the LM317 resistor calculation and the heat sink check.
- 1 Pick the solver mode: Choose Output Voltage to read V_out from R1 and R2, or Resistor R2 / Resistor R1 to solve the missing resistor.
- 2 Enter R1 (OUT to ADJ): Leave at 240 ohm for the standard bench design. R1 below 100 ohm is rejected.
- 3 Enter R2 or the target V_out: For solve-V_out mode, type R2. For solve-R1 / solve-R2 mode, type the target V_out between 1.25 V and 37 V.
- 4 Enter V_in and I_load: V_in is the unregulated rail; I_load is the steady current the load draws.
- 5 Read the result panel: V_out, the missing resistor, the I_ADJ error, the headroom, and the dissipation are reported with a heat sink label.
A bench supply needs 7.5 V at 100 mA. Set Solve For to Resistor R2, type R1 = 240 ohm, V_out = 7.5 V, V_in = 12 V, I_load = 100 mA, and the calculator returns R2 = 1200 ohm, headroom 4.5 V, power 0.45 W, no heat sink.
A bench LM317 supply benefits from decoupling capacitors per the datasheet's typical-application circuit, and a capacitor charge calculator sizes the input bulk capacitor from tau = R_source * C.
Benefits of Using This Calculator
A purpose-built LM317 calculator replaces the V_out algebra with a direct read and adds the heat sink check the bench wiring alone does not give you.
- • Solves the LM317 formula in all three directions: V_out from R1 and R2, R2 from R1 and target V_out, and R1 from R2 and target V_out.
- • Uses the 240 ohm R1 convention: R1 = 240 ohm is from the Texas Instruments datasheet's typical-application circuit because it produces about 5 mA through R1.
- • Reports the I_ADJ error term: The simplified 1.25 (1 + R2/R1) formula hides a small error from the ADJ pin quiescent current.
- • Checks Vin-Vout headroom: The LM317 falls out of regulation when the input-output differential drops near the 3 V minimum.
- • Flags heat sink above 1 W: The TO-220 thermal budget is roughly 1 W on free air, after which the junction temperature climbs toward the 125 degree C limit.
- • Covers both regulator modes: The same V_ref / R1 relationship drives constant-current mode I_out = V_ref / R1 + I_ADJ when the load sits between ADJ and ground.
The LM317 output filter and the load together form a decoupling network that suppresses high-frequency noise on the regulated rail, and an impedance matching calculator sizes the L-section between the regulator and the downstream stage.
Factors That Affect Your Results
Three variables drive the LM317 output and three datasheet limits decide whether the design is safe.
R1 bias current
R1 sees the nominal V_ref across it. 240 ohm gives about 5 mA, well above the LM317 minimum load.
R2 ratio R2/R1
V_out scales linearly with 1 + R2/R1, so resistor tolerance drives most of the bench spread you see on the DMM.
I_ADJ quiescent current
I_ADJ adds I_ADJ * R2 to V_out. For R2 under 2 kilohm the term is below about 0.1 V per the typical 50 uA figure.
Vin-Vout headroom
The LM317 datasheet puts the safe input-to-output differential up to 40 V and assumes at least 3 V of dropout margin.
Power dissipation and heat sink
The LM317 burns (Vin - Vout) * I_load as heat. The Texas Instruments thermal table lists the TO-220 resistance around 24 degree C per watt, setting the 1 W no-heat-sink threshold.
- • The simplified V_out = 1.25 (1 + R2/R1) ignores I_ADJ. For R2 above 4 kilohm the error approaches 0.2 V, so a precision design should use the full V_out = V_ref (1 + R2/R1) + I_ADJ * R2 form.
- • The calculator assumes standard constant-voltage wiring. In constant-current mode the LM317 needs R1 from OUT to ADJ and the load from ADJ to GND.
- • The heat sink threshold is approximate. Real TO-220 behaviour depends on copper area, airflow, and ambient temperature, so the 1 W trigger is a planning tool.
According to Wikipedia (Linear regulator), a linear regulator dissipates the difference between input and output voltage as heat, which is why the LM317 needs the Vin-Vout headroom check and the dissipation warning before the load is attached.
The heat sink budget uses the same Q = m x c x delta T identity that absorbs a dissipation burst during a load step, and a specific heat calculator walks through that delta-T calculation for a chosen heat sink material.
Frequently Asked Questions
Q: What is an LM317 voltage regulator?
A: The LM317 is an adjustable positive linear voltage regulator designed by Bob Dobkin at National Semiconductor in 1976. It has three pins (IN, OUT, ADJ), holds a nominal 1.25 V reference between OUT and ADJ, and delivers up to 1.5 A.
Q: How do you calculate the LM317 output voltage?
A: The LM317 output formula is V_out = V_ref (1 + R2/R1) + I_ADJ * R2, with V_ref near 1.25 V typical per the Texas Instruments datasheet. With R1 = 240 ohm and R2 = 720 ohm the formula gives 5.00 V; the I_ADJ term contributes about 0.036 V.
Q: What resistor values give 5 V from an LM317?
A: R1 = 240 ohm and R2 = 720 ohm is the standard 5 V reference design, derived by solving V_out = 1.25 (1 + R2/R1) for R2 with V_out = 5 V. Real parts land within a few percent because V_ref and the resistors are both typical rather than exact.
Q: How much current can an LM317 supply?
A: The TO-220 LM317 is rated for up to 1.5 A output current. The minimum load is about 3.5 mA typical per the datasheet, which is why R1 = 240 ohm is the convention to keep bias current well above that floor.
Q: What is the difference between LM317 and LM7805?
A: The LM7805 is a fixed 5 V linear regulator, while the LM317 is adjustable between 1.25 V and 37 V. The LM7805 has lower quiescent current and tighter output tolerance, but the LM317 wins when the rail voltage has to be tuned per board.
Q: Do I need a heat sink for the LM317?
A: A heat sink is recommended when P = (Vin - Vout) * I_load exceeds roughly 1 W for a TO-220 part on free air. The Texas Instruments datasheet recommends heatsinking for packages above the no-sink thermal budget once ambient and load push dissipation past that point.