LM317 Adjustable Resistor Calculator
Calculate output voltage from known resistor values, or calculate the required R2 for a target output voltage.
How the LM317 resistor network works
The LM317 is an adjustable linear voltage regulator. It holds a nearly constant voltage between the output and adjust pins (about 1.25 V). By placing two resistors around the regulator, you set the output voltage.
- R1 goes from Output to Adjust.
- R2 goes from Adjust to Ground.
- The regulator adjusts its internal pass element to keep the equation satisfied.
Core formula
The full equation includes adjust pin current:
In many quick estimates, the Iadj × R2 term is ignored because it is small. But for precision or high output voltages,
including it can improve your result.
Choosing practical resistor values
A very common starting value is R1 = 240 Ω. This keeps enough current flowing through the divider so regulation remains stable in many builds. You then compute R2 from your target output.
| Target Vout | R1 | Computed R2 (with Iadj = 50 µA) | Common nearest value |
|---|---|---|---|
| 3.3 V | 240 Ω | ≈ 390 Ω | 390 Ω |
| 5.0 V | 240 Ω | ≈ 713 Ω | 680 Ω or 750 Ω |
| 9.0 V | 240 Ω | ≈ 1.47 kΩ | 1.5 kΩ |
| 12.0 V | 240 Ω | ≈ 2.05 kΩ | 2.0 kΩ or 2.2 kΩ |
Design tips beyond the resistor math
1) Check dropout voltage
LM317 needs headroom between input and output. Depending on load current and device variant, you may need roughly 2 V to 3 V (or more) of extra input voltage. If your input is too low, the regulator cannot maintain your chosen output.
2) Verify power dissipation
Linear regulators burn off excess voltage as heat:
Even moderate current can create substantial heat. Use an adequate heatsink and check thermal resistance in the datasheet.
3) Use proper bypass capacitors
- Input capacitor near the regulator input pin helps stability and noise performance.
- Output capacitor helps transient response.
- Datasheet-recommended values and ESR ranges should be followed.
4) Account for resistor tolerance
If you need accurate output voltage, use 1% (or tighter) resistors and consider LM317 reference tolerance over temperature. For precision rails, calibration or a more accurate regulator may be required.
Common mistakes
- Forgetting the
Iadj × R2term when designing high-voltage outputs. - Ignoring dropout; expecting 12 V output from 12 V input.
- No thermal plan for high current.
- Using very large resistor values that reduce divider current too much.
FAQ
Can I use this for LM350 or LM338?
Yes, the same resistor equation structure applies to similar adjustable regulators. Always verify each device's datasheet values (Vref, Iadj, dropout, current rating).
Why does my measured output differ from calculated output?
Common causes: resistor tolerance, regulator tolerance, load changes, heat, wiring resistance, and meter accuracy. Real hardware is never perfect.
Should I always use 240 Ω for R1?
Not always, but it is a common and reliable default. If you change R1, recalculate R2 accordingly and confirm minimum load conditions from datasheet guidance.