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: .
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 Ω
| R2 | Output 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
- Voltage Divider CalculatorVoltage divider calculator: find the output voltage from R1, R2 and load, or the R2 for a target voltage, with current, power and nearest E12 value. Free.
- Ohms Law Calculator: Voltage, Current, Resistance and PowerOhms law calculator (Ohm’s law): enter any two of voltage, current, resistance or power and get the other two – with formula wheel and steps.
- LED Resistor CalculatorLED resistor calculator for 5 V, 12 V or 24 V: resistance, next E12/E24 standard value, power dissipation and resistor wattage – series or parallel.
- Watts to Amps Calculator: AC, Three-Phase and DCConvert watts to amps and amps to watts for 120 V, 240 V, three-phase and 12 V DC – with power factor, kVA, amp-hours and the next breaker size as a guide.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Twos complement calculatorTwos complement calculator for 4, 8, 16 or 32 bits: turn a negative decimal into binary or read a bit string, with ones complement, hex and the steps.
- Hydraulic cylinder calculator: push and pull force, speed and oil volumeHydraulic cylinder calculator: push and pull force from bore, rod and pressure, plus extend and retract speed, oil volume and cycle time – in psi or bar.
- DNA to mRNA and ProteinConvert DNA to mRNA and read the codons as amino acids: template or coding strand, start at AUG, stop codons, with the standard genetic code of the NCBI.
- Interval Notation CalculatorInterval notation calculator: type an inequality like x ≥ 3 or an interval like [3, ∞) and get interval, inequality and set-builder notation with unions.