Use this LM317 calculator to pick R1 or R2, estimate output voltage, and check input headroom and heat.
Table of contents
How to use our LM317 Voltage Regulator Calculator
- Choose What do you want to find?: R2 for a target output, output voltage from R1 and R2, or R1 for a target output.
- Enter Target output voltage, R1 between output and adjust, and R2 between adjust and ground where the selected mode needs them.
- Pick Resistor choice to use exact math or a nearest E12 or E24 resistor value for R2.
- Open Advanced options if you want to change Reference voltage, Adjust pin current, Input voltage, Load current, Needed input headroom, or heat settings.
- Sanity-check the result: Output with the resistor value to try should be close to your target, Input headroom margin should not be negative, and Estimated chip temperature should stay below Max junction temperature.

Definitions
R1 between output and adjust: The upper divider resistor connected from the LM317 output pin to the adjust pin.
R2 between adjust and ground: The lower divider resistor connected from the adjust pin to ground.
Reference voltage: The voltage the LM317 tries to keep across R1, usually entered as 1.25 V for a first estimate.
Adjust pin current: A small current that leaves the adjust pin and adds a small voltage term through R2.
Resistor choice: The choice between the exact calculated resistor and the nearest common E12 or E24 resistor value.
Needed input headroom: The extra input voltage above the output voltage used for the regulation check.
Input headroom margin: Input voltage minus Minimum input voltage to try. Negative means the input may be too low.
Thermal resistance junction to air: How many deg C the chip temperature rises for each watt of heat, using the package and cooling you expect.
Common mistakes and quick fixes
Mistake: Using Target output voltage below the Reference voltage.
Fix: Raise Target output voltage to at least the Reference voltage, or the LM317 resistor equation cannot reach it.
Mistake: Entering 0 for R1 between output and adjust.
Fix: Enter an R1 between output and adjust value greater than 0 ohms so the divider math does not divide by zero.
Mistake: Picking Exact math value under Resistor choice and then buying the closest resistor without checking the real output.
Fix: Choose E12 or E24 under Resistor choice and read Output with the resistor value to try before building.
Mistake: Entering Input voltage but leaving Load current blank, then looking for Power the LM317 must burn off.
Fix: Add Load current if you want heat results, or use Input headroom margin only for the voltage check.
Mistake: Ignoring a negative Input headroom margin.
Fix: Increase Input voltage, lower the target output, or change Needed input headroom using a value from your exact LM317 part.
Mistake: Treating Estimated chip temperature as exact.
Fix: Use Thermal resistance junction to air and Air temperature near the part that match your package, heatsink, and enclosure.
Limitations & Key Assumptions / Boundary Conditions
- The result is based on the standard LM317 adjustable-regulator equation and ideal resistor values before real resistor tolerance, wiring resistance, and meter accuracy are included.
- Nearest E12 and E24 suggestions use nominal resistor values only. A real 5% or 1% resistor can move the output.
- The heat estimate uses steady-state power and a single Thermal resistance junction to air value. Airflow, copper area, case mounting, and a heatsink can change the real temperature.
- Minimum input voltage to try uses your Needed input headroom entry. The real dropout needed can change with load current, temperature, and the exact LM317 version.
- Power the LM317 must burn off is only calculated when both Input voltage and Load current are entered. It does not include extra current used by the divider or by other parts of the circuit.
- The calculator does not check capacitor choice, stability, ripple, short-circuit behavior, protection diodes, or safe operating area.
Methodology
Core LM317 equation
The calculator uses the full LM317 divider equation by default. Adjust pin current is entered in uA and converted to amperes before the formula is used.
Vout = Vref * (1 + R2 / R1) + Iadj * R2
If Adjust pin current is set to 0, the equation becomes the simpler classroom version.
Finding the missing resistor
When the selected mode is Find R2 for a target output, the calculator rearranges the output equation to find the exact R2 value.
R2 = (Vout_target - Vref) / (Vref / R1 + Iadj)
When the selected mode is Find R1 for a target output, the calculator solves for R1 instead.
R1 = Vref * R2 / (Vout_target - Vref - Iadj * R2)
For R2 suggestions, Exact math value keeps the calculated value. E12 and E24 search the chosen standard values across decades and choose the value with the smallest absolute difference. If two values are equally close, the lower value is chosen.
nearest = standard_value_with_smallest_abs(standard_value - exact_resistor)
Voltage and heat checks
The standard resistor value to try is used to recalculate the expected output voltage. The miss from target is then actual output minus target output, so a negative value means the real output is below target.
target_miss = Vout_actual - Vout_target
Minimum input voltage and input margin are calculated from the actual output and the headroom value you entered.
Vin_min = Vout_actual + dropout_assumption
headroom_margin = Vin_entered - Vin_min
When Input voltage and Load current are both present, the regulator heat estimate is based on the voltage dropped by the LM317 times load current.
P_reg = (Vin_entered - Vout_actual) * I_load
Tj_est = ambient_temp + P_reg * thermal_resistance
Resistor power is estimated from the voltage across each resistor. R2 power is shown as 0 W when R2 is 0, so the calculator does not divide by zero.
P_R1 = Vref^2 / R1
P_R2 = (Vout_actual - Vref)^2 / R2
Mini-example
With Target output voltage = 5 V, R1 between output and adjust = 240 ohms, Reference voltage = 1.25 V, and Adjust pin current = 50 uA, the exact R2 is about 713.15 ohms. If Resistor choice is nearest E24, the calculator picks 680 ohms. That gives Output with the resistor value to try of about 4.826 V, which is 0.174 V low, or about -3.49% from the target.