LM317 Voltage Regulator Calculator
Calculate output voltage and resistor values for LM317 adjustable linear regulator circuits.
Component Values
Results
Vout = 1.25 × (1 + R2/R1)
VOUT VS R2
Vout = 1.25 × (1 + R2/R1)
How does the LM317 work?
The LM317 is an adjustable three-terminal positive voltage regulator that can supply up to 1.5A with an output voltage range from 1.25V to 37V. It regulates by maintaining a constant 1.25V reference voltage between its output and adjustment pins. This means Vout = 1.25 × (1 + R2/R1).
R1 is typically fixed at 240Ω (the datasheet-recommended value). R2 is chosen to set the desired output voltage. A small current (~50µA) flows out of the adjustment pin, but it's small enough to ignore in most designs. For stable operation, place a 0.1µF ceramic capacitor close to the input pin and a 1µF capacitor on the output.
The LM317 needs at least 2V of headroom (dropout voltage) above the output. If Vin − Vout < 2V, regulation fails. The power dissipated as heat is P = (Vin − Vout) × Iout. Above ~1W you'll need a heatsink. For high-current applications with large Vin−Vout difference, consider a switching regulator instead.
Output Voltage (Vout)
Vout = 1.25 × (1 + R2/R1)Power Dissipation
P = (Vin − Vout) × IoutKey Points
- Vout = 1.25V × (1 + R2/R1)
- Minimum dropout: ~2V (Vin must be ≥ Vout + 2V)
- Maximum output current: 1.5A with adequate heatsink
- Add 0.1µF input and 1µF output bypass capacitors
Applications
- Adjustable bench power supplies
- Battery charger circuits
- LED constant-current driver (with R sense)
- Replacing fixed-voltage regulators for custom voltages
LM317 Adjustable Voltage Regulator
Vout = Vref × (1 + R2/R1) + Iadj × R2Vref = 1.25V | Iadj ≈ 50–100µA (negligible if R2 < 10kΩ)Simplified: Vout ≈ 1.25 × (1 + R2/R1) | R1 typically 240ΩCurrent limiter: I_limit = Vref / R_current = 1.25 / ROutput Voltage Reference (R1 = 240Ω)
| Vout | R1 | R2 | Notes |
|---|---|---|---|
| 1.25V | 240Ω | 0Ω | Minimum output (Vref) |
| 1.5V | 240Ω | 96Ω | Use 100Ω |
| 2.5V | 240Ω | 240Ω | 2× R1 |
| 3.3V | 240Ω | 394Ω | Use 390Ω |
| 5.0V | 240Ω | 720Ω | Use 680Ω + 39Ω |
| 6.0V | 240Ω | 931Ω | Use 910Ω |
| 9.0V | 240Ω | 1.49kΩ | Use 1.5kΩ |
| 12.0V | 240Ω | 2.06kΩ | Use 2.0kΩ |
| 15.0V | 240Ω | 2.64kΩ | Use 2.7kΩ |
Practical Examples
5V regulated supply from 9V battery
R1=240Ω, R2=680Ω: Vout = 1.25×(1+680/240) = 4.79V ≈ 5V ✓
Add output cap 10µF + input cap 0.1µF. Max Vin=37V, Iout=1.5A.
Heat: P = (9–5)×0.5A = 2W → TO-220 heatsink needed for >200mA.
Current limiter for battery charging (500mA)
Connect as current source: R = 1.25V / 0.5A = 2.5Ω (use 2.4Ω + 0.1Ω trim).
Limits charge current regardless of battery voltage. Safe for Li-ion CC stage.
Design Tip
LM317 needs Vin – Vout > 3V (dropout voltage) to regulate. Power dissipation: Pd = (Vin – Vout) × Iout — use heatsink for > 1W. For very low dropout: use LM1117 (1.2V dropout) or LDO like MCP1700 (0.17V). Add 1µF tantalum on ADJ pin to improve ripple rejection by 15dB.
Did you know? The LM317 can provide output voltages from 1.25 V to 37 V with only two external resistors. Its internal reference voltage of 1.25 V is one of the most precisely specified parameters in analog electronics — typically within ±1%.