LM7805 vs LM317: Which Linear Voltage Regulator Should You Use?


The LM7805 and LM317 are two of the most widely used linear voltage regulators in electronic circuits. Both can be used to create a stable DC output from a higher DC input voltage, and both are available in common through-hole and surface-mount packages.

However, they are designed for different purposes.

The LM7805 provides a fixed 5 V output. The LM317 provides an adjustable positive output voltage, normally set with two external resistors. The best choice depends on whether the circuit needs a simple fixed 5 V supply or an adjustable output.

LM7805 vs LM317 at a Glance

SpecificationLM7805LM317
Regulator typeFixed positive linear regulatorAdjustable positive linear regulator
Standard output voltage5 VApproximately 1.25 V to 37 V
Output adjustmentNot requiredSet by two external resistors
Typical maximum output capabilityUp to 1.5 A, depending on package and thermal designUp to 1.5 A, depending on package and thermal design
Common useFixed 5 V power supplyAdjustable power supply
Design complexityLowerHigher
Pin functionInput, Ground, OutputAdjust, Output, Input

The pinout difference is especially important. Even when both regulators use a similar three-pin package, the pins do not have the same functions. They should never be treated as direct pin-for-pin replacements.

What Is the LM7805?

The LM7805 belongs to the 78xx family of fixed positive-voltage regulators. The “05” indicates that it provides a regulated 5 V output.

It is commonly used when a circuit requires a stable 5 V supply for microcontrollers, logic circuits, sensors, display modules, relays, and low-power control systems.

A basic LM7805 circuit normally needs only input and output capacitors. This makes it simple to design, easy to troubleshoot, and practical for many general-purpose applications.

What Is the LM317?

The LM317 is an adjustable positive linear voltage regulator. Instead of producing one fixed output voltage, it uses a resistor divider connected to its adjustment pin.

By selecting the resistor values, designers can set an output voltage from approximately 1.25 V to 37 V, subject to the input voltage and the device’s maximum input-to-output differential rating.

The LM317 is useful for adjustable bench power supplies, battery chargers, variable LED drivers, test equipment, and products that need several output-voltage options from one basic design.

Fixed Output vs Adjustable Output

The biggest difference is output flexibility.

The LM7805 is the better choice when the circuit always needs 5 V. It reduces the number of external components and avoids resistor-selection errors.

The LM317 is more flexible because the output can be adjusted. However, it requires two resistors to set the voltage, and the resistor values affect output accuracy.

For a fixed 5 V design, an LM317 can be configured to provide 5 V. In most cases, though, the LM7805 is simpler and more economical because it was designed specifically for this output voltage.

External Components

An LM7805 circuit is usually straightforward. Input and output capacitors are commonly added to improve stability, reduce noise, and support transient load changes.

An LM317 requires a resistor divider between the output and adjustment pin. Optional capacitors may also be used to improve ripple rejection or transient performance.

This means the LM317 can offer more control, but it also adds component count and PCB space.

For applications where manufacturing simplicity matters, a fixed regulator can reduce sourcing, assembly, and inspection requirements.

Pinout Differences

Package appearance can be misleading.

For a common TO-220 package viewed from the front, an LM7805 typically uses:

  1. Input

  2. Ground

  3. Output

An LM317 typically uses:

  1. Adjust

  2. Output

  3. Input

The metal tab may also connect to different pins depending on the part and package. Always check the exact datasheet for the manufacturer and package being purchased.

Using the wrong pinout can damage the regulator, connected components, or the power source.

Heat Dissipation and Efficiency

Both LM7805 and LM317 are linear regulators. They reduce voltage by converting the difference between input and output voltage into heat.

Power dissipation can be estimated with this formula:

Power Dissipation = (Input Voltage − Output Voltage) × Output Current

For example, if a regulator converts 12 V to 5 V at 1 A, it must dissipate approximately 7 W of heat. That is a significant thermal load and usually requires a suitable heat sink or a different power-conversion method.

For high input-to-output voltage differences or high-current applications, a switching buck converter is often more efficient than either regulator.

Common Applications

The LM7805 is commonly used in:

  • 5 V microcontroller power supplies

  • Logic circuits

  • Sensor modules

  • Small display systems

  • Embedded control boards

  • Fixed 5 V industrial circuits

The LM317 is commonly used in:

  • Adjustable bench power supplies

  • Variable-voltage test circuits

  • Battery-charging circuits

  • Adjustable LED current or voltage circuits

  • Prototypes requiring different output voltages

  • Educational and laboratory projects

Can LM317 Replace LM7805?

An LM317 can be configured to output 5 V, but it is not always the best replacement for an LM7805.

The LM317 needs external resistors, uses a different pinout, and may require PCB changes. It is suitable when output-voltage flexibility is needed, but it does not provide a simple drop-in replacement for an LM7805.

Likewise, an LM7805 cannot replace an LM317 in an adjustable-voltage circuit because it only provides a fixed 5 V output.

Which Regulator Should You Choose?

Choose the LM7805 when the design needs a fixed 5 V output and values simplicity, low component count, and easy implementation.

Choose the LM317 when the output voltage must be adjustable or when one circuit design needs to support several voltage options.

In either case, check the actual input-voltage range, output-current requirement, dropout voltage, package, operating temperature, thermal resistance, and protection features before selecting a specific manufacturer part number.

Conclusion

The LM7805 and LM317 are both useful linear voltage regulators, but they are not interchangeable. The LM7805 is a simple fixed 5 V regulator, while the LM317 is an adjustable regulator for flexible voltage-output designs.

For a stable 5 V supply, the LM7805 is usually the more direct solution. For adjustable voltage applications, the LM317 provides greater flexibility. The final choice should be based on output requirements, thermal conditions, pinout, PCB space, and the exact datasheet specifications.


Related Articles

Explore related electronics articles and guides.

Sep 27, 2026

LM358 vs LM324: What Is the Difference Between Dual and Quad Op Amps?

Compare LM358 and LM324 operational amplifiers by channel count, package, pinout, performance, and circuit applications to select the right part.

Sep 27, 2026

LM7805 vs LM317: Which Linear Voltage Regulator Should You Use?

Compare LM7805 and LM317 linear voltage regulators by output voltage, pinout, external components, heat dissipation, and applications.

Sep 27, 2026

1N4007 vs 1N5408: What Is the Difference?

Compare 1N4007 and 1N5408 rectifier diodes by current rating, voltage rating, package size, and applications to choose the right part for your design.

Aug 23, 2026

XC7A200T-2FBG484I Upgrade From XC7A100T-2FGG484C

Learn why engineers upgrade from XC7A100T-2FGG484C to XC7A200T-2FBG484I and what to consider for FPGA resource expansion and system migration.

Aug 23, 2026

XC7A100T-2CSG324I vs XC7A100T-2FGG484C FPGA Package Difference

Compare XC7A100T-2CSG324I and XC7A100T-2FGG484C package options and understand their impact on Artix-7 FPGA design, I/O planning and industrial applications.

Aug 23, 2026

XC7Z020-1CLG484I vs XC7Z020-2CLG484I Speed Grade Difference

Compare XC7Z020-1CLG484I and XC7Z020-2CLG484I speed grades and understand how performance differences affect Zynq-7000 embedded system design.

Aug 23, 2026

XC7Z020-1CLG400I vs XC7Z020-1CLG484I Package Selection

Understand the differences between XC7Z020-1CLG400I and XC7Z020-1CLG484I and how package selection affects Zynq-7000 embedded system design.

Aug 23, 2026

XC7Z020-1CLG400I vs XC7Z020-1CLG484I Package Difference

Compare XC7Z020-1CLG400I and XC7Z020-1CLG484I package differences, I/O requirements and design considerations for Zynq-7000 embedded systems.

Aug 23, 2026

XC7A35T-1CSG324C vs XC7A50T-2CPG236I FPGA

Compare XC7A35T-1CSG324C and XC7A50T-2CPG236I Artix-7 FPGA devices for industrial control, embedded applications and programmable logic designs.

Aug 23, 2026

Why Engineers Upgrade from XC6SLX45-2CSG324I to XC7A100T-1FGG484C for New FPGA Designs

Explore the differences between XC6SLX45-2CSG324I and XC7A100T-1FGG484C and understand why many FPGA designs migrate from Spartan-6 to Artix-7 platforms.

Aug 23, 2026

XC7Z020-1CLG484I vs XC7Z020-2CLG484I Speed Grade Difference and Zynq-7000 FPGA Selection Guide

Compare XC7Z020-1CLG484I and XC7Z020-2CLG484I Zynq-7000 SoC devices including speed grade differences, embedded applications and FPGA design considerations.

Aug 23, 2026

XC7A100T-2FGG484C vs XC7A200T-2FBG484I FPGA Upgrade Comparison for High Performance Designs

Compare XC7A100T-2FGG484C and XC7A200T-2FBG484I Artix-7 FPGA devices for industrial control, image processing, communication and hardware acceleration applicati...