Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Voltage Regulator Calculator (LM317, TL431, Zener)

Resistors for LM317, LM337 and TL431 outputs, Zener series resistors, headroom and heat.

Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 for 30 days No upload Works offline Engineering

Try before you buy.

  • Free preview: each check’s verdict, the names of the table’s first rows and a watermarked chart, with the resistors, the output and every other figure hidden.
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Regulator

Work out
V

Load

Input

The input comes from
V
V
Heat

Junction-to-ambient figures from the datasheet’s test board; a heat sink or more copper lowers them.

°C/W
°C
°C/W
°C/W
R2 —

Input voltage

Standard pairs

How it was calculated

    Next steps Done. What next?

    All engineering & electronics calculators

    Results are estimates from the formulas shown, not a professional design or certification. Have a qualified engineer verify anything safety-critical (structures, electrical installations, gas or pressure systems).

    About the Voltage Regulator Calculator (LM317, TL431, Zener)

    Design a linear voltage regulator from the datasheet formulas. For the adjustable LM317 (and its negative twin, the LM337) type the output you need and R1, and the calculator gives R2, the nearest standard value and the standard R1/R2 pairs that come closest while their divider still draws the minimum load, with the output range at the datasheet’s limits — or type both resistors to get the output. For the TL431 shunt reference it gives R1 for an output, the series resistor for your supply and load, and the cathode current at both ends; for a Zener shunt regulator, the series resistor and the Zener’s and the resistor’s dissipation.

    Then it checks the design. The headroom between the lowest input and the output (an LM317 needs about 3 V), the minimum load that keeps it regulating, the power in the regulator and its junction temperature for the package you choose, with the thermal resistance a heat sink must reach. Feed it from a DC supply, or from a transformer, rectifier and reservoir capacitor: the calculator sizes the capacitor for a ripple target (or gives the ripple of yours) and checks the headroom at the bottom of the ripple at low mains, with a chart of the ripple against the dropout limit.

    Without a pass, the free preview works on your own values and shows the verdict of every check, the names of the table’s first rows and the chart under a watermark, without its numbers; the resistors, the output, every other figure, the working, Copy result and the CSV come with a Pro pass.

    How to use it

    1. Choose the regulator, and for the LM317, LM337 or TL431 whether you want the resistors for an output or the output of your resistors.
    2. Type the output (or the resistors), R1 or R2, the load current and the least load current. Values take prefixes: 240, 2.2k, 20m for 20 mA.
    3. Describe the input: the lowest and highest DC voltage, or the transformer’s secondary voltage, the rectifier, the mains frequency and the ripple you accept.
    4. Choose the package and the ambient temperature under Heat, then read the resistor and the checks. Copy result and the CSV need a pass, or unlocking this result.

    Examples

    LM317 for 12 V
    Input
    R1 240 Ω, E24
    Result
    R2 = 2.044 kΩ; E24 2 kΩ gives 11.77 V; the closest E24 pair that still draws the 3.5 mA minimum load, 130 Ω and 1.1 kΩ, gives 11.88 V; in E96, 2.05 kΩ gives 12.03 V
    Reservoir capacitor
    Input
    15 V RMS bridge, 50 Hz, ±10% mains, 12 V at 1 A, 1.5 V ripple
    Result
    about 6,700 µF; 15.39 V at the bottom of the ripple at low mains
    Heat
    Input
    18 V in, 12 V out, 1 A, TO-220 (23.5 °C/W), 25 °C
    Result
    about 6 W and 167 °C at the junction: it needs 16.6 °C/W or less, so a heat sink
    TL431 at 5 V
    Input
    R2 10 kΩ, 9–12 V supply, 0–20 mA load, ±1% resistors
    Result
    R1 = 9.96 kΩ (10 kΩ gives 5.01 V, 4.83 V to 5.19 V at the limits); Rs ≤ 179.1 Ω → 160 Ω; up to 44.6 mA in the TL431
    Zener at 5.1 V
    Input
    ±5%, 5 mA least, 9–12 V in, 0–20 mA, 0.5 W
    Result
    RS ≤ 145.8 Ω → 130 Ω; up to 55 mA and 295 mW in the Zener (59% of its rating)

    LM317 and LM337 resistors

    The regulator keeps 1.25 V between OUT and ADJ, so R1 (OUT to ADJ) carries 1.25 V ÷ R1 and Vout = 1.25 V × (1 + R2 ÷ R1) + Iadj × R2 (TI SLVS044Z, equation 2). Solving for R2: R2 = (Vout − 1.25 V) ÷ (1.25 V ÷ R1 + Iadj). The ADJUST current is typically 50 µA (100 µA at most) for the LM317 and 65 µA for the LM337, which is why R1 is kept small. The reference itself may be 1.2 V to 1.3 V over temperature, so the calculator gives the output range with those limits and your resistor tolerance.

    The LM317 needs a minimum load current to regulate — 3.5 mA typical, up to 10 mA — which the divider can supply on its own: 1.25 V ÷ 240 Ω = 5.2 mA covers a typical part, 1.25 V ÷ 120 Ω = 10.4 mA every part (the LM337 datasheet uses 120 Ω for that reason). So the standard pairs the calculator suggests keep R1 small enough for the divider to draw the typical minimum load with the least load you enter (up to 357 Ω for an LM317 and 500 Ω for an LM337 with nothing else connected): a larger R1 can only seem closer because the ADJUST current, which varies from part to part, adds to the output.

    Headroom and heat

    • Headroom: TI recommends 3 V between input and output for the LM317 to deliver full current at its lowest temperature (2.5 V to 37 V for the LM337, SLVS047L); with less it drops out and the output follows the input. With a rectifier, the lowest input is the bottom of the ripple at low mains and full load.
    • Differential: at most 40 V between input and output for the LM317 and 37 V for the LM337, also at start-up when the output is still at 0 V.
    • Dissipation: PD = (VIN − VOUT) × IL + VIN × IG (SLVS044Z, equation 9), worst at the highest input and full load.
    • Junction temperature: TJ = TA + PD × RθJA; the largest RθJA the design allows is (TJ(max) − TA) ÷ PD with TJ(max) = 125 °C (equations 10–11). If the package cannot reach it, a heat sink must have θSA ≤ RθJA − (θCH + RθJC) (equation 12).
    • The package figures are the datasheet’s, measured on a standard test board; more copper or a heat sink lowers them. TI makes the LM317 in SOT-223 and TO-263 with a newer chip as well, rated 59.6 °C/W and 41 °C/W against the older chip’s 66.8 °C/W and 38 °C/W: the calculator offers both, and the worse figure is the safe one when you cannot tell which chip you will get.

    The rectifier and the reservoir capacitor

    A capacitor after the rectifier charges to the peak, √2 × VRMS minus the diode drops (two for a bridge, one for a centre-tapped or half-wave rectifier), and between peaks supplies the load alone, falling by about ΔV = I ÷ (f × C), where f is the ripple frequency: twice the mains frequency for full-wave rectification, the mains frequency itself for half-wave. So C = I ÷ (f × ΔV): 1 A with 2 V of ripple from 50 Hz mains through a bridge needs 1 ÷ (100 × 2) = 5,000 µF. The capacitor must be rated above the highest peak (high mains, no load), and the transformer’s voltage at full load is the one to use.

    TL431 and Zener shunt regulators

    • TL431: it holds its REF input at 2.495 V, so Vout = 2.495 V × (1 + R1 ÷ R2) + Iref × R1, from 2.495 V up to 36 V. It needs a cathode current of at least Imin (at most 1 mA for the standard grade; for the A and B grades 0.6 mA in their commercial-temperature versions and 0.7 mA in the others, so the calculator uses 0.7 mA) and at most 100 mA (TI SLVS543S). TI’s recommended operating range is 1 mA to 100 mA whatever the grade. The series resistor must keep Imin at the lowest supply and full load even with the output at its highest: Rs ≤ (Vsupply,min − Vout,max) ÷ (Iload,max + Ik,min + Idivider), where Vout,max takes the reference, Iref and the resistors at their limits; the TL431 then takes the most current at the highest supply, the least load and the lowest output.
    • Zener (onsemi HBD854/D): RS = (VI(min) − VZ(max)) ÷ (IZ(min) + IL(max)), then IZ(max) = (VI(max) − VZ(min)) ÷ RS − IL(min) and PZ(max) = IZ(max) × VZ(max). With the Zener’s dynamic impedance RZ the output moves by ΔVI ÷ (1 + RS/RZ + RS/RL) for an input change. The calculator rounds RS down to a standard value, so the current only grows.

    Sources

    Limitations

    • The datasheet figures are those of Texas Instruments’ LM317, LM337 and TL431. Other makers’ parts with the same number are similar but not identical: check their datasheets, above all the thermal figures and the TL431’s Imin.
    • The ripple formula assumes the capacitor supplies the whole load between peaks; the real ripple is a little smaller, and transformer and diode resistance lower the peak further under load.
    • Thermal results are steady-state estimates. Mains-powered designs need proper insulation, fusing and safety approval, which this calculator does not cover.
    • Line and load regulation, ripple rejection, noise and start-up behaviour are not calculated.

    Privacy

    Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

    Frequently asked questions

    What do I get without a pass?

    Without a pass, Voltage Regulator Calculator (LM317, TL431, Zener) shows each check’s verdict, the names of the table’s first rows and a watermarked chart, with the resistors, the output and every other figure hidden. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

    How do I calculate the LM317 resistors?

    R2 = (Vout − 1.25 V) ÷ (1.25 V ÷ R1 + Iadj). For 5 V with R1 = 240 Ω: 3.75 V ÷ (5.208 mA + 50 µA) = 713 Ω. Without the 50 µA adjustment current it would be 240 × (5 ÷ 1.25 − 1) = 720 Ω; pick the standard value, or let the calculator find the standard pair that comes closest.

    What input voltage does an LM317 need?

    At least the output plus about 3 V at the lowest point of the input, which with a rectifier is the bottom of the ripple at low mains, and no more than 40 V above the output. For 12 V out that means 15 V at the ripple’s bottom.

    Why does an LM317 output rise when nothing is connected?

    Below its minimum load current — 3.5 mA typical, up to 10 mA — the regulator’s own bias current lifts the output. The R1/R2 divider counts as load: R1 = 120 Ω draws 10.4 mA and covers every part; 240 Ω (5.2 mA) covers a typical one.

    How big should the filter capacitor be?

    C = I ÷ (f × ΔV), with f the ripple frequency: 100 Hz from 50 Hz mains through a bridge (120 Hz from 60 Hz). 1 A with 2 V of ripple needs 5,000 µF; 4,700 µF gives 2.13 V. Then check that the lowest point of the ripple still gives the regulator its headroom.

    How do I choose the series resistor for a Zener diode?

    RS = (lowest input − highest Zener voltage) ÷ (least Zener current + largest load current), then check the Zener’s power at the highest input with the least load: PZ = IZ(max) × VZ(max). A 5.1 V Zener from 9–12 V with a 20 mA load and 5 mA spare gives RS ≤ 145.8 Ω and up to 295 mW in the Zener with 130 Ω.

    Quick answers and tool search

    Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.