LM317 Calculator

Use the calculator below to design an adjustable power supply around the LM317 linear regulator. Enter your input voltage and resistor values to see the output voltage instantly — or work backward from a target voltage to find the resistors you need.

LM317 Vin Vout Adj R1 R2
Output Voltage -- V

Video: Building the LM317 Adjustable Power Supply

Prefer to watch it built? This excellent tutorial walks through the same R1/R2 design shown above, from bare components to a working bench supply.

What Is the LM317 Adjustable Voltage Regulator?

The LM317 is the most widely used adjustable linear voltage regulator in electronics. Unlike a fixed regulator such as the 7805, the LM317 lets you set any output voltage between 1.25V and 37V using just two external resistors — no extra ICs, no programming, no lookup tables.

It's also nearly indestructible: built-in current limiting, thermal shutdown, and safe-operating-area compensation mean it's very hard to damage through normal misuse. That combination of flexibility and durability is why hobbyists and engineers alike still reach for the LM317 as the "Swiss Army knife" of power supply design, decades after its release.

LM317 Voltage Formula: How to Calculate Output Voltage

The LM317 holds a fixed 1.25V reference (Vref) between its Output and Adjustment pins. That reference forces a constant current through R1, and the same current then flows through R2, producing a voltage drop that sets your output:

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

There's a small additional error term from the Adjustment-pin current (Iadj × R2), but since Iadj is only about 50µA, it's negligible for general-purpose designs and safely ignored in most calculations — including the one above.

Recommended R1 Value for LM317 Circuits

Most LM317 designs start with R1 = 240Ω, and there's a practical reason for that specific number: the LM317 needs a minimum load current of roughly 5mA to regulate correctly.

1.25V ÷ 240Ω = 5.2mA

That's just over the minimum, so R1 alone guarantees stable regulation even before you connect a load — which is why 240Ω (or the equally common 220Ω/270Ω) shows up in almost every LM317 reference design. Once R1 is fixed, R2 is the only value you need to solve for to hit your target output voltage.

Common LM317 Resistor Value Chart (R1 = 240Ω)

If you don't want to run the calculator, here are standard R2 values (using common 1% resistor values) paired with R1 = 240Ω and the output voltage they produce:

R2 (Ω) Output Voltage Typical Use
0 1.25V Minimum output
330 3.0V Low-voltage logic
470 3.7V Li-ion charging circuits
620 4.5V General low-voltage
750 5.15V ~5V rail (USB/logic)
910 6.0V General purpose
1000 6.46V Common mid-range output
1500 9.06V 9V battery replacement
2200 12.7V ~12V rail
3300 18.4V Op-amp / audio rails
5000 (pot) up to 27.1V Full-range adjustable supply

These are calculated from Vout = 1.25 × (1 + R2/R1), so swap in your own R2 in the calculator above to get an exact figure for non-standard resistor values.

Worked Example: Designing for 6.46V Output

Say you want a fixed 6.46V rail — a common choice for powering certain sensor modules or as a pre-regulated rail ahead of a 5V LDO. Here's the process:

  1. Fix R1 at 240Ω (satisfies the 5mA minimum load current).
  2. Rearrange the formula to solve for R2: R2 = R1 × (Vout / 1.25 − 1). Therefore, R2 = 240 × (6.46 / 1.25 − 1) = 240 × 4.168 = 1000Ω
  3. Verify: Vout = 1.25 × (1 + 1000/240) = 1.25 × 5.167 = 6.46V
  4. Pick real-world parts: 240Ω and 1kΩ are both standard 1% resistor values, so no series/parallel combinations are needed — a clean, buildable result.

This is exactly the R1/R2 pair reflected in the calculator's example above, and it's a good template to follow for any other target voltage: fix R1, solve for R2, then round to the nearest standard resistor value and re-check the output.

LM317 Adjustable Power Supply: Practical Applications

LM317 vs. Other Adjustable Regulators

The LM317 isn't the only option, and picking the right variant mostly comes down to current and voltage range:

Regulator Max Current Voltage Range Package Notes
LM317 1.5A 1.25–37V TO-220, TO-92, SOT-223 Most common, cheapest, widest support
LM350 3A 1.25–33V TO-220, TO-3 Pin-compatible with LM317, same formula
LM338 5A 1.25–32V TO-220, TO-3 Needs a larger heatsink at full current
LM337 1.5A −1.25 to −37V TO-220 Negative-voltage counterpart to the LM317
LM117 1.5A 1.25–37V Various Military/industrial-grade LM317 variant

If your design needs a dual-rail supply (positive and negative), the LM337 uses the identical R1/R2 formula but produces a negative output, and is commonly paired with an LM317 for symmetric ±V rails in audio and op-amp circuits.

Design Checklist Before You Build

Troubleshooting Common LM317 Problems

LM317 FAQ

Does the LM317 need a heatsink?

Probably. Like all linear regulators, the LM317 burns off excess voltage as heat rather than converting it efficiently:

Power dissipated = (Vin − Vout) × Current

Example: dropping 12V to 5V at 1A gives (12 − 5) × 1 = 7 watts of heat. Without a heatsink, the regulator will hit thermal shutdown within seconds at that dissipation level. As a rule of thumb, budget a heatsink any time you're dropping more than a couple of volts at currents above a few hundred milliamps.

Why does the LM317 need input/output capacitors?

The datasheet recommends a 0.1µF capacitor on the input (especially if the supply lead is long) and a 1µF capacitor on the output to improve transient response. Skipping these can let the regulator oscillate or "ring," which shows up as instability or noise on the output rail — an easy problem to avoid with two cheap capacitors.

What is the maximum current for an LM317?

The standard TO-220 package LM317 is rated for 1.5A, provided it's kept cool enough via heatsinking. For higher-current adjustable supplies, the pin-compatible LM350 (3A) and LM338 (5A) use the exact same formula and resistor network, making them drop-in upgrades when you need more current.

Can I use a potentiometer instead of fixed resistors?

Yes — replacing R2 with a potentiometer (commonly 5kΩ or 10kΩ) is how most adjustable bench supplies get a physical voltage knob. Wire R1 (fixed, 240Ω) as normal, then wire the pot as R2 between Output and Adj, with the wiper tied to Adj. Turning the pot sweeps Vout across the full range the pot's resistance allows.

Is the LM317 efficient?

Not especially — it's a linear regulator, so any voltage it drops is wasted as heat rather than delivered to the load. Efficiency is roughly Vout/Vin, meaning a 12V-to-5V conversion is only about 42% efficient. For battery-powered or high-current designs where efficiency matters, a switching buck converter is a better fit; the LM317 is best suited to bench supplies, low-noise analog rails, and moderate power levels where simplicity and low ripple matter more than efficiency.