LM317 Calculator — resistor values for voltage or current
Pick R1 and R2 for a target LM317 output voltage or constant-current setting, with dissipation and heatsink check.
Example: For 5 V out with R1 = 240 Ω, R2 is 720 Ω — use 750 Ω for 5.194 V.
Formula
V_out = 1.25 × (1 + R2/R1) + I_adj × R2 I_out = 1.25 / RCalculations follow TI LM317 datasheet.
Worked example
For 5 V out with R1 = 240 Ω, R2 is 720 Ω — use 750 Ω for 5.194 V.
R2 = R1 × (V_out / 1.25 − 1)
R2 = 240 Ω × (5 V / 1.25 − 1)
720 Ω
V_out = 1.25 × (1 + R2/R1) + I_adj × R2
1.25 × (1 + 750 Ω/240 Ω) + 50 µA × 750 Ω
5.194 V
The adjust-pin term adds 37.5 mV here — small, but it grows with R2.
Frequently asked questions
What resistors do I need for 5 V from an LM317?
With the datasheet's 240 Ω for R1, R2 works out at 720 Ω. The nearest E24 value is 750 Ω, which gives about 5.15 V. Use 1% resistors, or a trimmer, if you need it closer.
Why 240 Ω for R1?
It draws about 5 mA through the divider, which is the minimum load the LM317 needs to regulate properly. A larger R1 saves power but risks the output drifting high when the real load is disconnected.
Why does my LM317 get so hot?
Because it is a linear regulator: it burns the entire input-output difference as heat. Dropping 12 V to 5 V at 500 mA dissipates 3.5 W. That is physics, not a fault — use a buck converter if the difference is large.
Can the LM317 output less than 1.25 V?
Not on its own. 1.25 V is its internal reference and the minimum it can produce. Getting below that needs a negative bias on the adjust pin, or a different regulator designed for low outputs.
Related tools
Zener Diode Regulator Calculator
Series resistor, power dissipation and safe load range for a zener shunt regulator.
Circuits
Voltage Divider Calculator
Compute divider output voltage, or pick the best E24/E96 resistor pair for a target ratio — including the error your load introduces.
Components
Heat Sink & Thermal Resistance Calculator
Junction temperature from dissipation and thermal resistances, and the θSA you need to stay inside the derating curve.
Power & Wiring
Power Dissipation Calculator
Component dissipation and the derated part rating you should actually specify.
Power & Wiring
E-Series Preferred Value Finder
Snap any ideal value to the nearest real E3–E192 part and see the error you inherit by doing so.
Components
555 Timer Calculator
Design astable, monostable and 50%-duty 555 circuits. Get the schematic, the waveform, and a bill of materials in stock E24 values.
Circuits