To use an LM317 calculator effectively, you must understand the exact governing equation rather than just plugging numbers into a web tool. The output voltage of an LM317 adjustable linear regulator is calculated as:

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

Where the internal reference voltage (Vref) is nominally 1.25V, and the adjustment pin leakage current (Iadj) is typically 50 µA. If you need a quick 5V rail right now, use R1 = 240Ω and R2 = 715Ω (the closest standard 1% E96 value to the ideal 713Ω).

The Core LM317 Voltage Formula

The LM317 maintains a precise 1.25V reference voltage between its output (Vout) and adjustment (ADJ) pins. The resistor divider formed by R1 and R2 scales this reference up to your desired output voltage. However, the internal error amplifier requires a small quiescent current (Iadj) to operate, which exits the ADJ pin and flows through R2, creating a minor voltage error that must be accounted for in precision designs.

LM317 Formula Symbol Definitions
Symbol Parameter Typical Value / Unit Description
Vout Output Voltage 1.25V to 37V The regulated DC voltage measured at the output pin relative to ground.
Vref Reference Voltage 1.25V The internal bandgap reference maintained between Vout and ADJ pins.
R1 Program Resistor 1 120Ω or 240Ω Resistor connected between Vout and ADJ. Sets the minimum load current.
R2 Program Resistor 2 Variable (Ω) Resistor connected between ADJ and ground. Scales the output voltage.
Iadj Adjustment Pin Current 50 µA (0.00005 A) Quiescent current flowing out of the ADJ pin. Varies slightly with temperature and load.

For a deeper look at the internal silicon architecture and thermal characteristics, refer to the Texas Instruments LM317 Datasheet. The formula above applies to all standard variants, including the LM317L (100mA) and LM317HV (high voltage).

Assumptions, Limits, and Unit Traps

An LM317 calculator is only as good as the physical limits you apply to its outputs. Blindly trusting the math will result in a circuit that fails on the bench.

When the Formula Applies (and When It Doesn't)

  • Dropout Voltage: The formula assumes Vin - Vout ≥ 2.0V to 3.0V (depending on load current). If you want 12V out, your input must be at least 14V to 15V. If Vin drops below this threshold, the LM317 enters dropout and Vout will simply be Vin minus the dropout voltage.
  • Minimum Load Current: The LM317 requires a minimum load current (typically 5mA to 10mA) to maintain regulation. This is why R1 is almost always chosen as 240Ω (drawing ~5.2mA) or 120Ω (drawing ~10.4mA). If you use a 1kΩ resistor for R1, the divider only draws 1.25mA, and the output voltage will drift unpredictably high.
  • Realistic Magnitudes: Vout cannot be lower than Vref (1.25V). The absolute maximum Vout is limited by the IC's maximum input-to-output differential rating (typically 40V for standard LM317, 60V for LM317HV).

Unit Mistakes That Break the Math

The most common error when manually calculating LM317 resistor values is mixing units in the Iadj error term. Iadj is specified in microamps (µA).

  • If R2 is in Ohms (Ω), you must use Iadj in Amperes (0.00005 A). The resulting product is in Volts.
  • If R2 is in kilo-Ohms (kΩ), you must use Iadj in milliamps (0.05 mA).
  • Mixing kΩ with Amperes will result in an output voltage calculation that is off by a factor of 1,000, leading you to select completely wrong resistor values.

Worked Examples: From Bench to Breadboard

Let's walk through two practical design scenarios, tracking units at every step to ensure accuracy.

Problem 1: Finding R2 for a 9V Battery Eliminator

Scenario: You need a precise 9.0V output to power a guitar pedal. You have chosen R1 = 240Ω to satisfy the minimum load current requirement. What value of R2 is required?

Given: Vout = 9.0V, R1 = 240Ω, Vref = 1.25V, Iadj = 0.00005 A.

Step-by-step derivation:

  1. Start with the core formula:
    9.0V = 1.25V × (1 + R2 / 240Ω) + (0.00005A × R2)
  2. Distribute the 1.25V:
    9.0V = 1.25V + (1.25V / 240Ω) × R2 + 0.00005A × R2
  3. Calculate the conductance term (1.25 / 240 = 0.005208 A):
    9.0V = 1.25V + 0.005208A × R2 + 0.00005A × R2
  4. Combine the R2 coefficients:
    9.0V - 1.25V = (0.005208A + 0.00005A) × R2
    7.75V = 0.005258A × R2
  5. Isolate R2:
    R2 = 7.75V / 0.005258A = 1473.9 Ω

Practical Selection: The closest standard 1% (E96 series) resistor is 1470Ω. Using 1470Ω will yield an actual output of approximately 8.98V, which is well within the tolerance of a 9V pedal.

Problem 2: Predicting Vout with Standard E24 Resistors

Scenario: You are scavenging parts and only have R1 = 120Ω and R2 = 390Ω (5% tolerance). What will the output voltage be?

Given: R1 = 120Ω, R2 = 390Ω, Vref = 1.25V, Iadj = 0.00005 A.

Step-by-step derivation:

  1. Plug values into the formula:
    Vout = 1.25V × (1 + 390Ω / 120Ω) + (0.00005A × 390Ω)
  2. Calculate the resistor ratio:
    390 / 120 = 3.25
  3. Calculate the Iadj error term:
    0.00005A × 390Ω = 0.0195V
  4. Combine terms:
    Vout = 1.25V × (1 + 3.25) + 0.0195V
    Vout = 1.25V × 4.25 + 0.0195V
  5. Final multiplication and addition:
    Vout = 5.3125V + 0.0195V = 5.332V

Analysis: The Iadj term only contributed ~20mV of error. For low-value R2 resistors, the error term is negligible, but it becomes significant when R2 exceeds 5kΩ. For more on component tolerances and standard values, consult the ON Semiconductor LM317 Specifications.

Rearranged Forms for Component Selection

Web calculators usually only solve for Vout or R2. When you are designing a programmable power supply or reverse-engineering a board, you need the algebraic rearrangements for every variable in the equation.

  • Solving for Vout (Standard Form):
    Vout = Vref × (1 + R2 / R1) + (Iadj × R2)
  • Solving for R2 (Setting Voltage with Fixed R1):
    R2 = (Vout - Vref) / [ (Vref / R1) + Iadj ]
  • Solving for R1 (Setting Minimum Load / Divider Ratio):
    R1 = (Vref × R2) / [ Vout - Vref - (Iadj × R2) ]
  • Solving for Iadj (Characterizing a Specific IC Sample):
    Iadj = [ Vout - Vref × (1 + R2 / R1) ] / R2
  • Solving for Vref (Verifying Internal Bandgap Drift):
    Vref = [ Vout - (Iadj × R2) ] / (1 + R2 / R1)

LM317 Calculator FAQ

How does an LM317 calculator account for the adjustment pin current?

A robust LM317 calculator includes the (Iadj × R2) term in its backend math. While basic hobbyist calculators might assume Iadj is zero (simplifying the formula to Vout = 1.25 × (1 + R2/R1)), this introduces an error that scales linearly with R2. If R2 is 10kΩ, ignoring the 50µA Iadj current will result in a calculation error of 0.5V. Always use a calculator that explicitly models the adjustment pin leakage.

What resistor values should I input into an LM317 calculator for a 12V power supply?

For a 12V output, start by locking R1 to 240Ω to guarantee the required 5mA minimum load current. Input R1 = 240Ω and Vout = 12V into the rearranged R2 formula. The ideal mathematical value for R2 is approximately 2057Ω. The closest standard 1% resistor is 2050Ω, which will yield an output of 11.96V. If you only have 5% resistors, a 2.0kΩ or 2.2kΩ resistor will get you into the 11.7V to 12.6V range, which is acceptable for most 12V DC motor and relay applications.

Why does my physical LM317 circuit measure a different voltage than the LM317 calculator output?

Discrepancies between the calculator and your multimeter usually stem from three physical realities:
1. Resistor Tolerance: Standard 5% carbon film resistors can easily skew your output by ±0.5V. Use 1% metal film resistors for precision.
2. Ground Trace Resistance: If R2 is tied to ground via a long, thin breadboard trace or a daisy-chained ground wire, the voltage drop across that trace adds directly to Vout. Always tie the bottom of R2 directly to the ground pin of the LM317 (Kelvin connection).
3. Iadj Variance: The 50µA figure is a typical value; the datasheet specifies it can range from 20µA to 100µA depending on the specific silicon batch and junction temperature.

Can I use an LM317 calculator for negative voltage regulators?

No. The LM317 is strictly a positive voltage regulator. If you are designing a negative power supply (e.g., for op-amp dual rails or audio gear), you must use the LM337. The LM337 uses the exact same mathematical formula and resistor topology, but the pinout is different (Adjust, Vin, Vout instead of Adjust, Vout, Vin), and current flows in the opposite direction. The reference voltage magnitude remains 1.25V, but it is referenced below ground.