About the LM317 Voltage Regulator Calculator
This LM317 calculator sets up the classic adjustable linear regulator. Give it R1 and the output voltage you want and it solves for R2, rounds it to the nearest standard E12, E24 or E96 resistor and tells you the voltage you will really get. Or enter both resistors to find the output voltage of an existing circuit.
It also checks the practical limits that trip people up: the input must be at least about 3 V above the output for the regulator to stay in regulation, the difference must not exceed 40 V, and the power the LM317 turns into heat — (Vin − Vout) × load current — decides whether you need a heatsink. The current through R1 should also meet the minimum load current the chip needs.
Figures follow the Texas Instruments LM317 datasheet: a typical reference of 1.25 V between OUT and ADJ, and a typical adjust-pin current of 50 µA that adds a small error proportional to R2. Real parts vary from 1.2 V to 1.3 V, so use a trimmer for R2 when you need an exact voltage.
With the default inputs, the output voltage is 5.01 V. Change any value above to recalculate instantly.
How to use the lm317 voltage regulator calculator
- 1Choose whether to find R2 for a voltage or Vout from existing resistors.
- 2Enter R1 (240 Ω is standard) and the target output voltage or R2.
- 3Pick the resistor series you have on hand (E12, E24 or E96).
- 4Enter the input voltage and load current to check headroom and heat.
- 5Fit the suggested R2, or a trimmer pot, and size a heatsink if needed.
Formula and method
The LM317 holds a 1.25 V reference between its OUT and ADJ pins. That voltage across R1 sets a constant current (1.25 V ÷ R1) which also flows through R2, along with the small adjust-pin current of about 50 µA. The output is therefore 1.25 × (1 + R2/R1) + I_ADJ × R2; solving for R2 gives the formula above.
Because R2 is rarely a standard value, the calculator rounds it to the nearest value in the chosen series (by ratio) and reports the voltage you actually get. Linear regulators dissipate the whole voltage difference as heat, so power equals (Vin − Vout) times load current. TI recommends 3–40 V between input and output, output current up to 1.5 A and a minimum load of 3.5 mA typical (10 mA maximum, specified at a 40 V input-output difference).
- Vout
- Regulated output voltage (V)
- R1
- Resistor from OUT to ADJ (Ω)
- R2
- Resistor from ADJ to ground (Ω)
- I_ADJ
- Adjust-pin current, ~50 µA typical
- P
- Power dissipated in the regulator (W)
Worked examples
5 V from 12 V with R1 = 240 Ω (E96)
R2 = (5 − 1.25) ÷ (1.25/240 + 0.00005) = 3.75 ÷ 0.0052583 ≈ 713 Ω. The nearest E96 value is 715 Ω, giving 1.25 × (1 + 715/240) + 0.00005 × 715 ≈ 5.010 V. At 0.5 A the regulator drops about 7 V and dissipates about 3.5 W, so it needs a heatsink.
Output of R1 = 240 Ω, R2 = 2 kΩ from 15 V
Vout = 1.25 × (1 + 2000/240) + 0.00005 × 2000 = 11.667 + 0.1 = 11.767 V. That leaves 3.23 V of headroom from a 15 V input — just above the 3 V recommendation — and 0.97 W of dissipation at 300 mA.
3.3 V from a 5 V rail with E24 resistors
R2 = 2.05 ÷ 0.0052583 ≈ 389.9 Ω, and 390 Ω is a standard E24 value giving 3.301 V. But 5 V − 3.3 V is only 1.7 V of headroom, below the 3 V the datasheet recommends — a low-dropout regulator is a better choice here.
Frequently asked questions
What is the LM317 output voltage formula?+
Vout = 1.25 V × (1 + R2/R1) + I_ADJ × R2, where R1 connects OUT to ADJ and R2 connects ADJ to ground. I_ADJ is about 50 µA, so the second term is small unless R2 is several kilohms.
Why is R1 usually 240 Ω?+
1.25 V across 240 Ω gives about 5.2 mA, which helps meet the regulator’s minimum load current so the output stays in regulation even with no external load. Values of 120–270 Ω are common.
What is the dropout voltage of the LM317?+
The LM317 needs roughly 1.5–2.5 V between input and output depending on current and temperature, and TI’s recommended operating condition is at least 3 V. For a smaller difference use a low-dropout (LDO) regulator.
Does the LM317 need a heatsink?+
It depends on (Vin − Vout) × current. A TO-220 package without a heatsink can typically shed only about 1–1.5 W before reaching high junction temperatures; beyond that, use the heatsink calculator to size one.
What is the maximum output of an LM317?+
The adjustable range is 1.25 V to 37 V with up to 1.5 A of output current, provided the input-to-output difference stays within 3–40 V and the chip is cooled adequately.