Home Improvement

LM317 Voltage Regulator Calculator

Enter the output you want and the top resistor to get the adjust resistor and the least input voltage.

Your numbers

Find

The resistor between the output and the adjust pin. 240 is a common example.

Above the reference voltage.

Adds the heat the regulator must shed.

More options

The nominal value between the output and adjust pins. Check the data sheet of your part.

An example value. Enter 0 to ignore it.

The least headroom between input and output. An example; read it from the data sheet.

Result

R2

713.2 ohm

For 5 V with R1 = 240 ohm. The nearest E24 value is 680 ohm, giving 4.8257 V.

R2 needed
713.2 ohm
Nearest E24 value for R2
680 ohm
Output with that value
4.8257 V
Least input voltage
7 V
How this was calculated
  1. The regulator holds its reference voltage across R1, so the current in R1 and R2 is Vref / R1, and Vout = Vref x (1 + R2 / R1) + Iadj x R2.
  2. Solving for R2: R2 = (Vout - Vref) / (Vref / R1 + Iadj) = (5 - 1.25) / (0.00520833 + 0.00005) = 713.154 ohm.
  3. The input must be at least the output plus the dropout. The heat in the regulator is (Vin - Vout) x load current.
  • Values are the nominal numbers you enter, not guaranteed limits. Real parts vary with temperature and load, and resistors have tolerances, so confirm the output with a meter before connecting anything delicate.

Calculated using SumPanda.com · https://sumpanda.com/lm317-voltage-regulator-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the lm317 voltage regulator calculator

  1. Choose R2 for a wanted output, Output from R1 and R2, or Current limit resistor.
  2. For voltage, enter the top resistor R1 and either the output you want or the value of R2. Add the input voltage and load current to see the heat in the regulator.
  3. For a current limit, enter the single resistor.
  4. In Advanced options adjust the reference voltage, adjust pin current and dropout to match your data sheet.

Formula

Vout = Vref x (1 + R2 / R1) + Iadj x R2

R2 = (Vout - Vref) / (Vref / R1 + Iadj)

Constant current: I = Vref / R

Regulator power = (Vin - Vout) x load current; least Vin = Vout + dropout

The regulator holds a steady reference voltage between its output and adjust pins, so the current in R1 is Vref / R1. The small adjust pin current adds a little to the output.

Five volts from a 240 ohm resistor

With R1 = 240 ohms, a 1.25 V reference and a 50 uA adjust current, a 5 V output needs R2 = 3.75 / (0.0052083 + 0.00005) = 713.15 ohms. The nearest E24 value is 680 ohms, which gives 4.8257 V, and the least input is 7 V with a 2 V dropout.

Using R1 = 240 and R2 = 720 gives 5.036 V. From a 12 V input at 0.5 A the regulator turns (12 - 5.036) x 0.5 = 3.482 W into heat. A 2.5 ohm resistor in the current limiter connection sets 0.5 A and dissipates 0.625 W.

Choosing resistors

Resistors come in standard series. The E24 series has 24 values per decade, about 10 percent apart, and the page shows the nearest one with the output it would give. If the result is slightly off, choose the next value up or down, or combine two resistors in series or parallel. A 1 percent resistor from a finer series gives a tighter result.

To work out the current in a resistor see the Ohm's law calculator, to split a voltage with two resistors the voltage divider calculator, and to size a resistor for an LED the LED resistor calculator.

Heat and headroom

A linear regulator turns the whole voltage drop times the current into heat. A large drop with a high current needs a heat sink, and the input must stay above the output plus the dropout. When the heat is large, a switching regulator may be a better fit.

Assumptions and limits

  • The reference voltage, adjust current and dropout are nominal values that you can edit. Check the data sheet of the exact part.
  • Resistor tolerances, temperature drift and load regulation are not modeled.
  • The wanted output must be above the reference voltage.
  • The limiter connection uses a single resistor and ignores the small adjust pin current.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I calculate the LM317 output voltage?

Use Vout = 1.25 x (1 + R2 / R1) plus a small term for the adjust current. With R1 = 240 ohms and R2 = 720 ohms the output is about 5.04 V.

What value should R1 be?

Data sheet circuits often show 240 ohms, and some use 120 ohms, so that enough current flows through the divider to keep the regulator in control. Check the minimum load current in the data sheet of your part.

How do I make a constant current source with an LM317?

Place one resistor between the output and adjust pins and take the load from the adjust side. The current is the reference voltage divided by the resistor, so 2.5 ohms sets about 0.5 A.

Why does my regulator get hot?

It dissipates the voltage across it times the current. Dropping 7 V at 0.5 A is 3.5 W, which needs a heat sink. Lower the input voltage or the current to reduce the heat.