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 / R

Calculations follow TI LM317 datasheet.

Worked example

For 5 V out with R1 = 240 Ω, R2 is 720 Ω — use 750 Ω for 5.194 V.

  1. R2 = R1 × (V_out / 1.25 − 1)

    R2 = 240 Ω × (5 V / 1.25 − 1)

    720 Ω

  2. 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