Home › Calculators › LM317 Voltage Regulator Calculator

LM317 Voltage Regulator Calculator

Calculate the output voltage of an LM317 adjustable regulator from R1 and R2, find the best standard resistor pair for a target voltage, or size the resistor for a constant-current (current-limiter) circuit. Add the input voltage and load current to check headroom, power dissipation and whether you need a heatsink.

Last updated:

Calculate
Ω
Ω
V
Ω

blank = search 100–1000 Ω

mA
V
V
A
°C
Regulator constants
V
µA
Enter your values to see the result.
Advertisement
Advertisement

How to use the LM317 Voltage Regulator Calculator

  1. Pick a mode: output voltage from resistors, resistors for a target voltage, or current limiter.
  2. Enter your values: R1 and R2 in ohms, the target voltage, or the target current in mA.
  3. Choose a resistor series (E12, E24 or 1% E96) for the standard-value search.
  4. Add input voltage and load current to check headroom and heat; set the ambient temperature if it is hot.
  5. Press Calculate and use the ranked table to pick parts you have on hand.

How the LM317 sets its output

The LM317 keeps a constant reference of about 1.25 V between its OUT and ADJ pins. R1 turns that voltage into a fixed current (1.25 V / R1); the same current flows through R2 to ground, so the voltage across R2 adds on top of the reference. That gives the familiar equation:

Vout = 1.25 V × (1 + R2 / R1) + Iadj × R2

Put a 0.1 µF ceramic capacitor on the input near the chip and about 1 µF on the output. A 10 µF capacitor from ADJ to ground improves ripple rejection; if you add it, protection diodes across the regulator are recommended for high output voltages.

Common LM317 resistor values (R1 = 240 Ω)

TargetExact R2E24 R2Actual Vout*
3.3 V390 Ω390 Ω3.30 V
5 V713 Ω680 Ω4.83 V
6 V903 Ω910 Ω6.03 V
9 V1.47 kΩ1.5 kΩ9.14 V
12 V2.04 kΩ2 kΩ11.77 V
13.8 V2.38 kΩ2.4 kΩ13.87 V
15 V2.61 kΩ2.7 kΩ15.45 V

*With Vref = 1.25 V and Iadj = 50 µA. Use the calculator's resistor mode to search other R1 values: for 5 V, R1 = 120 Ω with R2 = 360 Ω gives exactly 5.02 V.

Design tips

  • Minimum load: the LM317 needs a few milliamps flowing out to stay in regulation. R1 provides that path, so keep R1 at 240 Ω or lower (120 Ω for the 10 mA worst case).
  • Heat is the real limit: a linear regulator burns the whole voltage difference as heat. Dropping 12 V to 5 V at 1 A wastes 7 W, which needs a sizeable heatsink; a buck converter is usually better for large drops.
  • Constant current: in limiter mode the 1.25 V drop on the sense resistor plus the regulator's dropout means the input must be several volts above the load voltage.
  • Bigger relatives: the LM338 (5 A) and LM350 (3 A) use the same 1.25 V reference and the same equations, so this calculator works for them too.

Frequently asked questions

What is the LM317 output voltage formula?

Vout = Vref × (1 + R2 / R1) + Iadj × R2, where Vref is about 1.25 V between the OUT and ADJ pins, R1 connects OUT to ADJ, R2 connects ADJ to ground and Iadj is the adjust-pin current (typically 50 µA). The Iadj term is small, so Vout ≈ 1.25 × (1 + R2 / R1) is a good approximation.

What value should R1 be for an LM317?

240 Ω is the classic datasheet value, which passes about 5.2 mA. Because the worst-case minimum load current can be up to 10 mA, many designs use R1 = 120 Ω (about 10 mA) so the output stays regulated with no load attached. Values from 100 to 330 Ω are common.

How do I use an LM317 as a current limiter or LED driver?

Connect a single resistor R between OUT and ADJ and take the output from the ADJ side of the resistor. The regulator keeps 1.25 V across R, so I = 1.25 / R. For 350 mA, R = 1.25 / 0.35 ≈ 3.57 Ω, and the resistor dissipates 1.25 × 0.35 ≈ 0.44 W.

How much input voltage does an LM317 need?

The input must be higher than the output by at least the dropout voltage, which is roughly 1.5 to 2.5 V depending on load current and temperature. Allowing about 3 V of headroom is a safe rule. The input-to-output difference must also stay below 40 V for the standard part.

Does my LM317 need a heatsink?

Power dissipated in the regulator is (Vin − Vout) × load current. A TO-220 package in free air has a junction-to-ambient thermal resistance of roughly 50 °C/W, so it can handle only about 1.5–2 W at room temperature before the junction approaches 125 °C. Above that you need a heatsink; the calculator estimates the required heatsink rating in °C/W.

What is the output range and maximum current of the LM317?

The standard LM317 adjusts from 1.25 V to 37 V and can supply more than 1.5 A in the TO-220 package with adequate heatsinking. It has internal current limiting and thermal shutdown. Check your exact part's datasheet, since packages and variants differ.

Why is my LM317 output a little different from the calculation?

Resistor tolerance (5% for E24, 1% for E96), the Vref tolerance of the chip (about 1.2 to 1.3 V) and load effects all shift the output. For a precise voltage, use 1% resistors or replace part of R2 with a trimmer potentiometer.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

Voltage Divider CalculatorVout from R1, R2 and Vin, with loaded and unloaded output.LED Resistor CalculatorFind the resistor for an LED, with nearest standard value and wattage.Ohm's Law CalculatorSolve voltage, current, resistance and power from any two values.Resistor Color Code CalculatorRead 4, 5 and 6 band resistor colors, or find colors for a value.Electricity Cost CalculatorEstimate kWh usage and electricity costs.Capacitor Code CalculatorDecode 3-digit capacitor codes to pF, nF and µF, and back.Power Factor CalculatorCalculate power factor, kW, kVA and kVAR, and correction capacitor size.EV Charging Cost CalculatorCost to charge an electric car, per charge, per mile and per km.Battery Life CalculatorEstimate how long a battery lasts from its mAh or Wh and the load.Series & Parallel Resistor CalculatorAdd resistors in series or parallel and find standard value combinations.555 Timer CalculatorAstable frequency, duty cycle and monostable pulse width for the NE555 timer.Wire Size CalculatorFind the AWG or kcmil wire size for a load from amps, distance, voltage and allowed voltage drop.Solar Panel CalculatorEstimate solar system size, number of panels and roof area from your monthly kWh and sun hours.Voltage Drop CalculatorVoltage drop in volts and percent for copper or aluminum wire, AWG or mm², 1- or 3-phase.RC Time Constant Calculatorτ = RC, charge % at 1-5τ, and capacitor charge or discharge voltage at any time t.Resonant Frequency CalculatorLC resonant frequency f = 1/(2π√LC), or solve the inductance or capacitance you need.Capacitor Series and Parallel CalculatorTotal capacitance of capacitors in series or parallel, plus stored energy ½CV² and charge.Generator Size CalculatorAdd appliance running and starting watts to find the generator size you need.LED Savings CalculatorYearly savings, kWh saved and payback time when switching old bulbs to LED.Battery Bank Size CalculatorSize a solar or off-grid battery bank: Ah, kWh and battery count from daily Wh and autonomy.Battery Charge Time CalculatorHow long to charge a battery: mAh or Ah, charger current, efficiency and current charge %.Circuit Breaker Size CalculatorBreaker size from watts or amps, voltage and the 125% continuous rule, with a wire gauge.Conduit Fill CalculatorCheck conduit fill % against the NEC 40% limit for EMT, PVC, RMC and more, with pass/fail.Home Electrical Load CalculatorHome service load in VA and amps with NEC demand factors and a 100/150/200 A recommendation.EV Charging Time CalculatorHow long to charge an EV: battery kWh, charge levels and charger kW, with Level 1/2/DC presets.RLC Impedance CalculatorSeries or parallel RLC impedance, phase angle, resonant frequency and Q at any frequency.Inverter Size CalculatorFind the inverter size for your appliances: continuous watts, surge and battery current.ND Filter CalculatorLong exposure shutter speed for any ND filter in stops, ND number or density.Op Amp Gain CalculatorInverting, non-inverting or differential op amp gain in V/V and dB, with output voltage.PCB Trace Width CalculatorMinimum PCB trace width for a current per IPC-2221, for internal and external layers.RC Filter Cutoff CalculatorRC low-pass or high-pass cutoff frequency, solve R or C, with a Bode magnitude chart.Reactance CalculatorInductive and capacitive reactance at any frequency, or solve for L, C or frequency.SMD Resistor Code CalculatorDecode 3-digit, 4-digit and EIA-96 SMD resistor codes, or find the code for a value.Solar Panel Tilt Angle CalculatorBest fixed tilt, seasonal and monthly solar panel angles and direction for any latitude.Transformer Turns Ratio CalculatorSolve transformer voltage, turns or turns ratio, with primary/secondary current and VA.UPS Runtime CalculatorEstimate UPS battery backup time from battery V, Ah, count, efficiency and load, with Peukert.PC Power Supply CalculatorEstimate your PC's load watts and the PSU wattage you need, with efficiency running costs.Power to Weight Ratio CalculatorVehicle hp per tonne, lb per hp and kW/kg from power and weight; compare cars and bikes.Wire Resistance CalculatorWire resistance from material, AWG or diameter, length and temperature, plus voltage drop.Solar Charge Controller Size CalculatorSize an MPPT or PWM charge controller in amps from panel watts, Voc, Isc and battery voltage.4-20mA CalculatorScale a 4-20 mA signal to a process value and back, with percent and shunt voltage.Antenna Length CalculatorDipole, quarter-wave and 5/8-wave antenna lengths for any frequency or radio band.Battery Pack Calculator18650, 21700 or LiFePO4 series/parallel pack: voltage, Ah, Wh, max current and weight.DC Circuit SimulatorDraw batteries, resistors, bulbs and switches and see voltages and currents flow live.E-Bike Range CalculatorEstimate e-bike miles or km per charge from battery Wh, assist level, weight, speed and hills.Lewis Structure GeneratorDraw Lewis dot structures with valence electrons, lone pairs, formal charges and VSEPR shape.Motor Full Load Current CalculatorFull load amps from motor hp or kW, voltage, phase, efficiency and power factor, with NEC values.Population Growth CalculatorExponential or logistic population growth over time with carrying capacity, table and chart.Rocket Launch ScheduleUpcoming orbital rocket launches with live countdowns, launch windows, pads and filters.Transformer Sizing CalculatorTransformer kVA needed from volts and amps or kW and PF, next standard size and full-load amps.
See all 51 Electrical & Electronics Calculators →