LM317 Resistor Calculator
Calculate R2 resistor value for LM317/LM338 adjustable voltage regulator output voltage, with actual Vout and resistor power dissipation.
TI LM317 datasheet equation · V_REF = 1.25 V plus I_ADJ·R2API slug lm317-resistors
Specification
Circuit
| Ref | Position | Ideal |
|---|---|---|
| R1 | Reference | 240Ω |
| R2 | Adjust | 713.2Ω |
Response
- Actual Output Voltage
- 5V
- Power in R1
- 6.51mW
- Power in R2
- 19.72mW
Formula
Texas Instruments LM317 Datasheet (SNVS774)
| Symbol | Quantity | Your value |
|---|---|---|
| Vref | LM317 reference voltage (1.25V) (V) | — |
| R1 | Output to ADJ resistor (Ω) | 240 Ω |
| R2 | ADJ to GND resistor (Ω) | 713 Ω |
| Iadj | ADJ pin current (A) | 50 µA |
Assumptions
6 items
- 01The LM317 holds its 1.25 V reference between the output and ADJ pins, and the ADJ pin’s current flows through R₂: V_out = 1.25 V × (1 + R₂/R₁) + I_ADJ·R₂ (TI LM317 datasheet, SNVS774), solved for R₂ = (V_out − 1.25 V)/(1.25 V/R₁ + I_ADJ).
- 02The reference is exactly 1.25 V and I_ADJ the value entered (50 µA by default): the reference’s tolerance and I_ADJ’s spread are not applied, so the output voltage, from 1.25 V to 37 V, is a nominal figure.
- 03R₁ carries 1.25 V/R₁ and R₂ that current plus I_ADJ, each dissipating I²R; the regulator’s own dissipation, (V_in − V_out)·I_out, its dropout and its minimum load current are not computed.
- 04R₁ is the reader’s choice, 240 Ω by default as in the datasheet, and R₂ is the part solved for the output voltage asked for.
- 05With a part series chosen, R₁ is rounded to the nearest value of that series, R₂ is solved for the rounded R₁ and rounded in turn, and the output voltage, the powers and the KiCad export are the rounded pair’s; with Ideal values R₂ is exact and the output voltage is the one asked for.
- 06The input and output capacitors and the protection diodes the datasheet recommends are not part of the design or the export.
Worked example
5 V rail with R1 = 240 Ω, E24
An LM317 is to give 5 V with the datasheet’s 240 Ω for R1 and 50 µA of ADJ pin current, both resistors from the E24 series. Which R2 is it, and what output voltage do the rounded resistors set?
| Step | Expression | Result |
|---|---|---|
| Exact R2 | (5 V − 1.25 V) / (1.25 V / 240 Ω + 50 µA) | 713.2 Ω |
| R2 in E24; R1 = 240 Ω is an E24 value already | 713.2 Ω → E24 | 680 Ω |
| Deviation of R2 from its exact value | (680 / 713.2 − 1) × 100 | −4.65 % |
| Output voltage as built | 1.25 V × (1 + 680 / 240) + 50 µA × 680 Ω | 4.826 V |
| Power in R1 | (1.25 V)² / 240 Ω | 6.51 mW |
| Power in R2 | (1.25 V / 240 Ω + 50 µA)² × 680 Ω | 18.8 mW |
How it works
LM317 resistor calculator computes R2 for a chosen R1 for adjustable voltage output — essential for bench power supplies, battery chargers, and prototype voltage regulators. Power supply designers, hobbyists, and test engineers use the LM317 for its simplicity and wide voltage range (1.25V to 37V). Per Texas Instruments datasheet (SNVS774) and the LM317 JEDEC registration, the regulator maintains 1.25V reference between output and adjust pins: Vout = 1.25V × (1 + R2/R1) + Iadj × R2, where Iadj = 50-100μA (typically 50μA). Thermal design follows JEDEC JESD51 standards for IC thermal characterization. The standard design uses R1 = 240Ω (TI recommendation) with R2 calculated for desired output. Load regulation is 0.1%/A; line regulation is 0.01%/V. Dropout voltage is 2-3V depending on load current, requiring Vin > Vout + 3V for proper regulation.
Practical tips
- Use 1% resistors so the divider adds little error — the 1.25V reference itself has ±4% tolerance, which sets the output's accuracy unless R2 is trimmed
- Add 1N4002 protection diodes: cathode to input for input short protection, cathode to output with anode to adjust for output short protection per TI datasheet
- The LM317's own current limit (about 1.5 A typical for the TO-220 part) protects it. For a set, lower limit, wire it as a current source, a resistor of 1.25 V/I_limit from OUT to ADJ with the load on ADJ (1.25 Ω for 1 A), or add a sense resistor and a transistor that pulls ADJ down when the sense voltage reaches about 0.7 V
Common mistakes
- Forgetting input capacitor — LM317 may oscillate without 0.1μF ceramic at input pin; place capacitor within 1cm of regulator per TI application note SNVA558
- Ignoring dropout voltage — LM317 requires Vin > Vout + 2-3V; for 5V output, minimum input is 7-8V. LDO alternatives (LM1117) have 1.2V dropout
- Omitting output capacitor — while stable without, 10μF output capacitor improves transient response from 10ms to 100μs settling time
Frequently asked questions
4 questions
What voltage range can the LM317 produce?
1.25V (minimum, R2 = 0) to 37V (maximum, limited by package). Input voltage range: 3V to 40V. Input-output differential: minimum 2-3V (dropout), maximum 40V. For voltages below 1.25V, use a regulator with a lower reference, such as a dedicated low-voltage LDO; the LM317L (same function, lower current) has the same 1.25V reference.
Can I use this calculator for other voltage regulators?
Yes for LM350 (3A version) and LM338 (5A version) — same 1.25V reference and formula. For LM1117 (LDO): Vout = Vref × (1 + R2/R1) with Vref = 1.25V. For TL431: Vout = 2.5V × (1 + R1/R2) — note different reference voltage and resistor position.
Why does TI recommend R1 = 240Ω?
240Ω provides optimal balance: low enough to swamp Iadj error (50μA × R2 term), high enough to minimize quiescent current (1.25V/240Ω = 5.2mA). Lower R1 improves accuracy but wastes power; higher R1 increases sensitivity to Iadj variation. Range: 120Ω to 1kΩ acceptable.
How efficient is the LM317?
Efficiency = Vout/Vin × (1 - quiescent/Iload). For 12V to 5V at 1A: η = 5/12 × (1 - 0.005) ≈ 41.5%. For better efficiency, use switching regulators: TPS563200 achieves 92% at same conversion ratio. LM317 is suitable for low-power (<2W) applications where simplicity outweighs efficiency.
Shop Components
As an Amazon Associate we earn from qualifying purchases.