LM317 Voltage and Resistor Calculator
Calculate the LM317 output voltage from resistors R1 and R2, or find the resistor values for a target voltage. Enter the two resistances to get the regulated output in volts.
Adjustable Voltage Regulator Output Tool
LM317 Output Voltage Formula
Where:
- \(V_{out}\) — output voltage (V)
- \(V_{ref}\) — internal reference voltage, \(1.25\text{ V}\) for the LM317
- \(R1\) — resistor between the output and adjust pins (Ω)
- \(R2\) — resistor between the adjust pin and ground (Ω)
- \(I_{adj}\) — adjust pin current, typically \(50\text{ µA}\)
The LM317 holds a fixed \(1.25\text{ V}\) across \(R1\), which sets a constant current through the resistor divider; the output voltage is the reference voltage plus the drop across \(R2\).
LM317 Voltage – Calculation Example
Example: an LM317 regulator uses the standard resistor values \(R1 = 240\ \Omega\) and \(R2 = 1200\ \Omega\).
\[ V_{out} = 1.25 \cdot \left(1 + \frac{1200}{240}\right) + 0.00005 \cdot 1200 \]
\[ V_{out} = 1.25 \cdot 6 + 0.06 = 7.5 + 0.06 = 7.56\ \text{V} \]
Result: the output voltage is approximately 7.56 V. Ignoring the small adjust pin current gives \(7.5\text{ V}\), the value most datasheets quote for this classic resistor pair.
How to Use the LM317 Calculator
- Enter the value of Resistor R1 in ohms. This is the resistor connected between the output and adjust pins; 240 Ω is the datasheet recommendation.
- Enter the value of Resistor R2 in ohms. This resistor sits between the adjust pin and ground.
- Read the Output Voltage in volts, calculated with \(V_{ref} = 1.25\text{ V}\) and \(I_{adj} = 50\text{ µA}\).
To find an \(R2\) value for a desired output voltage, rearrange the formula and solve for \(R2\), then use the calculator to verify the result:
\[ R2 = R1 \cdot \frac{V_{out} - V_{ref}}{V_{ref} + I_{adj} \cdot R1} \]
About the LM317 Adjustable Regulator
The LM317 is one of the most popular linear voltage regulators ever made. Unlike fixed 5 V or 12 V regulators, its output can be set anywhere from \(1.25\text{ V}\) up to about \(37\text{ V}\) simply by choosing two resistors. It requires an input voltage at least \(2\text{ V}\) to \(3\text{ V}\) above the desired output (the dropout voltage), and it can supply up to 1.5 A with adequate heatsinking.
The device works by maintaining exactly \(1.25\text{ V}\) between its output and adjust pins. This constant voltage across \(R1\) drives a fixed current through the divider, and the regulator raises its output until the voltage at the adjust pin matches what the divider produces. Because the feedback loop closes through the divider, the output is stable and predictable once the resistor ratio is fixed.
In practice, the \(I_{adj} \cdot R2\) term contributes only a few tens of millivolts and is often neglected for quick estimates. However, the adjust pin current is not perfectly constant, so where precision matters — or when \(R2\) is large — keeping the full formula avoids surprises. For most hobby and general-purpose supplies, the simplified formula \(V_{out} \approx 1.25 (1 + R2/R1)\) is accurate to within about 1%.
Typical applications include bench power supplies, battery chargers, LED drivers with current-limiting configurations, and adjustable bias supplies. If you need a fixed reference or a shunt-style regulator, a Zener diode resistor calculator covers a different but related design approach.
Choosing Resistor Values — Tips and Limitations
- Keep R1 near 240 Ω. The datasheet recommends \(R1 = 240\ \Omega\) so that the divider current (about 5 mA) is large enough to keep the regulator in stable operation; the LM317 needs a minimum load current of typically 3.5–10 mA.
- Use standard values. Because resistor tolerance directly affects output accuracy, 1% metal-film resistors give noticeably better results than 5% carbon types. If you need an odd value, combine resistors and check the equivalent with a parallel resistance calculator.
- Respect the input-output headroom. The input voltage must exceed the output by at least the dropout voltage (2–3 V). Above that, the regulator dissipates \((V_{in} - V_{out}) \cdot I_{load}\) as heat — size the heatsink accordingly.
- Watch the dissipation in R2. At high output voltages \(R2\) can dissipate meaningful power; check that its wattage rating is adequate.
- Add bypass capacitors. An input capacitor (0.1 µF) and an output capacitor (1 µF tantalum or 10 µF electrolytic) improve transient response and stability; an optional 10 µF capacitor across \(R2\) boosts ripple rejection.
- Current flowing to the load also flows through your wiring. For higher currents, verify conductor sizing with a wire gauge calculator to limit voltage drop and heating.
The calculator assumes typical datasheet values of \(V_{ref} = 1.25\text{ V}\) and \(I_{adj} = 50\text{ µA}\). Actual devices vary slightly between units, so measure the real output voltage after building the circuit and fine-tune \(R2\) with a trimmer if you need tighter accuracy.
Common R1/R2 Combinations (R1 = 240 Ω)
| R2 | Vout (approx.) |
|---|---|
| 240 Ω | 2.5 V |
| 720 Ω | 5.0 V |
| 1.2 kΩ | 7.5 V |
| 2.16 kΩ | 12.5 V |
| 3.36 kΩ | 18.8 V |
Values are computed with the simplified formula; the full calculation adds roughly \(I_{adj} \cdot R2\) to each result.
Frequently Asked Questions
How do I calculate the LM317 output voltage by hand?
Multiply the reference voltage by the resistor ratio and add the adjust pin term: \(V_{out} = 1.25 \cdot (1 + R2/R1) + I_{adj} \cdot R2\). For a quick estimate, drop the last term — with \(I_{adj} = 50\ \mu A\) it adds only a few tens of millivolts. Example: R1 = 240 Ω and R2 = 720 Ω gives \(1.25 \cdot 4 \approx 5\ V\). Use the calculator to verify your arithmetic.
Can the LM317 output less than 1.25 V?
No — 1.25 V is the theoretical minimum, set by the internal reference between the output and adjust pins. Even with \(R2 = 0\) (adjust pin tied directly to ground), the output stays at about 1.25 V. To get lower voltages you need a negative rail on the adjust pin or a different regulator, such as an adjustable buck converter, which is also far more efficient at large input-output differences.
Can I enter resistor values in kΩ or use E-series values?
The calculator expects ohms, so convert first: 1 kΩ = 1000 Ω, 4.7 kΩ = 4700 Ω. Because the result depends on the R2/R1 ratio, small rounding of resistor values shifts the output proportionally. If you must use standard E12/E24 values, try combinations — for example 1.2 kΩ = 1 kΩ + 200 Ω in series, or two resistors in parallel — and check the equivalent resistance before calculating.
Why is 240 Ω recommended for R1, and can I use a different value?
The LM317 needs a minimum load current of roughly 3.5–10 mA to regulate properly. With \(R1 = 240\ \Omega\) the divider draws about 5 mA, satisfying that requirement by itself. If you increase R1 to save power, the divider current may fall below the minimum and the output can drift upward at light loads. Lower values work but waste current and heat the resistor; check its wattage rating.
Can I use a potentiometer for R2 to make an adjustable supply?
Yes, that is the classic bench-supply arrangement. Replace R2 with a pot (or a fixed resistor in series with a pot to set the minimum voltage). Turn the pot and the output sweeps from roughly \(1.25 \cdot (1 + R_{min}/R1)\) up to the maximum set by your input headroom. Use a linear taper pot, and remember the output can rise if the wiper goes open-circuit — some designs add a fixed resistor in parallel as a safety fallback.
How much voltage and power does the LM317 waste as heat?
The regulator drops \(V_{in} - V_{out}\) across itself, dissipating \((V_{in} - V_{out}) \cdot I_{load}\) watts. Example: 12 V in, 5 V out at 1 A means 7 W of heat — a substantial heatsink is required. If the input must always be at least 2–3 V above the output anyway, avoid feeding it from a much higher voltage than needed. Without adequate cooling the LM317 shuts down on its thermal limiter.
Why does my built circuit measure a different voltage than calculated?
Resistor tolerance (5% parts can shift the output noticeably), unit-to-unit variation in \(V_{ref}\) (1.2–1.3 V across devices), and the non-constant adjust pin current all contribute. Verify the actual output with a multimeter — but be careful probing a live circuit. If precision matters, replace R2 with a trimmer in series with a fixed resistor and fine-tune the output after assembly. Also confirm the input voltage exceeds the output by at least the dropout voltage under full load.