🔋

LM317 Voltage Regulator Calculator

Calculate the output voltage of an LM317 adjustable regulator, and the resistor needed for a target voltage.

Input
ℹ R1 is typically 240 Ω. Iadj ≈ 50 µA (often negligible).
Results
Output Voltage (Vout)—
Required R2 for Target Vout—
💡 Usage & Formula

LM317 sets its output by holding Vref (≈1.25 V) across R1, so the divider R1/R2 programs Vout.

  • Output: Vout = Vref × (1 + R2/R1) + Iadj × R2
  • Required R2: R2 = (Vout − Vref) / (Vref/R1 + Iadj)

Usage: Keep R1 ≈ 240 Ω, set R2 for the voltage you need, or type a Target Vout to get the exact R2. Minimum Vout = Vref (1.25 V).

When you need it: Setting an adjustable linear regulator's output with two resistors, or wiring it as a simple constant-current source for an LED string or battery charger.

Worked example: Vout = 1.25 × (1 + R2/R1); with R1 = 240 Ω, R2 = 720 Ω → 1.25 × (1 + 3) = 5.0 V. As a current source, I = 1.25 / R.

Tips & gotchas:

  • Keep the standard R1 ≈ 240 Ω so the regulator's minimum load current is always met.
  • Dissipation is (Vin − Vout) × I — a large drop at high current needs a real heatsink.
  • It needs roughly 2.5–3 V of headroom (dropout); an LDO is better when Vin is close to Vout.
  • Add the datasheet protection diodes when using large output or adjust-pin capacitors.
📖 References: LM317 (Wikipedia)