LM317 calculator: output voltage, R2 and constant current

This LM317 calculator uses equation 2 of the Texas Instruments data sheet: Vout = 1.25 V × (1 + R2 ÷ R1) + 50 µA × R2. With R1 = 240 Ω and R2 = 720 Ω the regulator delivers 5.04 V; for 12 V you need R2 = 2044.4 Ω, and a 100 mA current source needs 12.5 Ω.

Example: Calculate: output voltage from R1 and R2 · R1 (OUT to ADJ) 240 Ω · R2 (ADJ to GND) 720 Ω → Result: Output voltage 5.04 V. Source: Texas Instruments – LM317 3-Terminal Adjustable Regulator, data sheet SLVS044Z (rev. April 2025): electrical characteristics 6.6, section 7.3, equation 2 (read 09.10.2026). Updated: .

Ω
Ω
V
0 = no headroom check
mA
with input voltage: power dissipated in the regulator
My ToolboxYour inputs are saved in this browser only.

Result

Result
Output voltage 5.04 V
Details
ItemValue
Output voltage (with IADJ = 50 µA)5.04 V
Without the adjust pin current5.00 V
Range for VREF 1.2–1.3 V4.84 – 5.24 V
Current through R15.21 mA
Input voltage for 3 V headroom8.04 V
FormulaVout = 1.25 V × (1 + R2 ÷ R1) + 50 µA × R2
Calculated value with typical data sheet values (VREF 1.25 V, IADJ 50 µA); resistor tolerances shift the real voltage – check with a meter.

How it is calculated

Vout = VREF × (1 + R2 ÷ R1) + IADJ × R2. VREF is 1.25 V (1.2 to 1.3 V over all parts), IADJ is typically 50 µA – the TI data sheet calls it negligible in most applications. R1 sits between OUT and ADJ, R2 between ADJ and ground. The output can be set from 1.25 V to 37 V.

Examples with R1 = 240 Ω

R2Output voltage
390 Ω3.30 V
720 Ω5.04 V
2000 Ω11.77 V
3300 Ω18.60 V

With 240 Ω and 720 Ω the ideal value is 5.00 V; the 50 µA adjust current adds 0.036 V. Because VREF may lie anywhere between 1.2 and 1.3 V, the same pair gives 4.84 to 5.24 V – trim with a potentiometer if you need an exact voltage.

R2 for a target voltage

Solved for R2: R2 = (Vout − 1.25 V) ÷ (1.25 V ÷ R1 + 50 µA). With R1 = 240 Ω you need 389.9 Ω for 3.3 V, 713.2 Ω for 5 V, 1473.9 Ω for 9 V and 2044.4 Ω for 12 V; pick the nearest standard value and check the result in the first mode. 240 Ω lets 5.21 mA flow through R1, above the minimum load current of 3.5 mA typical.

Constant current source

With a single resistor between OUT and ADJ the LM317 keeps the current at I = 1.25 V ÷ R, and the resistor needs a rating above (1.25 V)² ÷ R. 100 mA needs 12.5 Ω and 0.125 W, 20 mA needs 62.5 Ω and 0.025 W, 350 mA needs 3.57 Ω and 0.438 W. For a single LED on a fixed voltage the LED resistor calculator is simpler; plain resistor ratios are in the voltage divider calculator.

Headroom and heat

The data sheet specifies the regulator for 3 to 40 V between input and output, so a 5.04 V output needs at least 8.04 V in. The difference turns into heat: 12 V in, 5.04 V out and 500 mA load means 3.48 W in the LM317 – that needs a heat sink.

Frequently asked questions

What is the LM317 output voltage formula?

Vout = 1.25 V × (1 + R2 ÷ R1) + 50 µA × R2. R1 = 240 Ω and R2 = 720 Ω give 5.04 V.

Which R2 do I need for 12 V?

With R1 = 240 Ω: R2 = (12 − 1.25) ÷ (1.25 ÷ 240 + 0.00005) = 2044.4 Ω. A 2 kΩ resistor gives 11.77 V.

Why is R1 usually 240 Ω?

It lets 5.21 mA flow, enough for the minimum load current of 3.5 mA typical given in the data sheet.

How do I use the LM317 as a current limiter?

Put one resistor R = 1.25 V ÷ I between OUT and ADJ. 100 mA needs 12.5 Ω rated above 0.125 W.

What input voltage does the LM317 need?

The data sheet specifies 3 to 40 V between input and output: for 5.04 V out, at least 8.04 V in.

How exact is the calculated voltage?

It is an estimate with typical values. VREF varies from 1.2 to 1.3 V, so 240 Ω and 720 Ω can give 4.84 to 5.24 V.

Sources and legal basis

As of: · Editorial policy

Related tools