LM7805 vs LM317: Which Voltage Regulator Fits
LM7805 vs LM317: compare the fixed 5-volt regulator and the adjustable regulator by output, current, dropout, and when to choose each for your design.
LM7805 vs LM317 is the classic regulator comparison in hobbyist, industrial, and education electronics, because the two parts are the most recognizable three-terminal regulators in the world and every designer has stacked them side by side. The LM7805 is a fixed-output regulator that delivers a steady 5 volts, and the LM317 is an adjustable regulator whose output is set by two resistors to any value within its range, and the comparison between them is less about which is better and more about what the rail needs. Both parts share the three-terminal TO-220 heritage, both deliver up to about one and a half amps, and both belong to families that the market reproduces across the vendors, so the choice is a design decision about the output, the current, the dropout, and the thermal, rather than about one part beating the other. This guide compares the two across the output options, the current and the dropout, the package and the thermal, the applications, and the replacement families, and it gives the rule for choosing between them, so the next rail picks the fixed part or the adjustable part on the evidence.
The comparison also carries the sourcing and the replacement view, because both parts sit at the center of the pin-compatible regulator market that this site trades in. A design that chooses the LM7805 selects the 78xx family, whose three-pin layout every major vendor and a field of domestic parts reproduce, and a design that chooses the LM317 selects the adjustable family that the market also standardizes on, so both choices open a deep replacement market. The guide therefore covers the engineering comparison and the replacement view together, and it is the working reference an engineer keeps beside the two datasheets. The LM7805 and the LM317 are the two ends of the regulator tension, the simplicity of the fixed part and the versatility of the adjustable part, and the comparison is the map between the two ends.
LM7805 vs LM317: The Core Design Difference
The core difference between the LM7805 and the LM317 is the output architecture, and every practical difference follows from it. The LM7805 is a fixed positive regulator that contains its reference and its output-voltage divider inside the package, so it always outputs 5 volts, and the designer connects the input, the ground, and the output and adds the two capacitors. The LM317 is an adjustable positive regulator that outputs 1.25 volts between its output and its adjustment pin, and the designer sets the output by a resistor divider between the adjustment pin and the output and ground, so one LM317 serves any output from about 1.25 volts up to nearly its input minus the dropout. The fixed part is the simplest possible rail, and the adjustable part is the most flexible single part in the catalog, and the comparison is the tension between the simplicity and the flexibility. The core difference is the decision the schematic makes first, and it is the difference that the rest of the guide reads in the applications.
The internal design also explains why the two parts behave the way they do at the output. The LM7805's internal divider is trimmed at the factory, so its 5-volt output is accurate with no external parts, and the LM317's external divider carries the duty and the tolerance of the output setting. The LM317's 1.25-volt reference, the voltage between its output and its adjustment pin, is the standard that the divider multiplies, and the divider's resistors and their tolerance and their drift become part of the output tolerance. The comparison therefore reads the output accuracy as the fixed part's strength and the output flexibility as the adjustable part's strength, and the design that needs a precise standard rail chooses the LM7805 while the design that needs a custom rail chooses the LM317. The core difference is the output, and the output decision is the first and the largest of the comparison.
Fixed versus adjustable output in practice
The fixed-versus-adjustable difference plays out in the small decisions of the board. A fixed 5-volt rail, or a fixed 12-volt rail from a 7812, is two capacitors and a part, the layout is trivial, and the output is accurate because the factory trimmed it. An adjustable rail is the fault part plus the two resistor values chosen by the designer, and the layout adds the divider, the tolerance, and the adjust-pin bypass that the datasheet recommends. The board that uses several fixed rails chooses the fixed parts by their values, the 7805, the 7809, the 7812, and the board that needs a value the fixed catalog does not offer, or a value that may change in a future revision, chooses the LM317 and turns the value by a resistor. The practice is to prefer the fixed part for every standard rail and the adjustable part for the non-standard and the future-flexible rail, and the practice is the working face of the core difference.
Output Voltage and Applications: LM7805 vs LM317
The output voltage maps the two parts to their applications, and the mapping is the practical half of the comparison. The LM7805's 5-volt output is the standard logic rail, the rail that the microcontrollers, the logic, the sensors, and the interfaces ran on for decades, and it is the application that the 7805 defines: the fixed 5-volt supply for a digital block, a sensor board, or a module, derived from a higher input such as a 9-volt or a 12-volt source. The LM317's adjustable output serves the non-standard rails, the 3.3-volt rail when no fixed part is handy, the 6-volt rail, the 8-volt rail, the bench supply whose knob the designer turns, and the test and the prototype power where the value changes. The two parts also share the rails they can serve, because the LM317 set to 5 volts delivers the same rail as the 7805, and the comparison is then decided by the other factors, the dropout, the part count, and the sourcing. The output maps the parts, and the mapping is the reason the 7805 owns the 5-volt world and the LM317 owns the flexibility.
The application set also explains the educational value of the two parts, because the LM7805 teaches the fixed regulator and the LM317 teaches the adjustable regulator, and together they cover the two modes of linear regulation. The hobbyist bench, the breadboard power section, the audio preamp supply, the sensor node, and the industrial control module all use one or both, and the comparison that a designer builds through the pair is the comparison this guide states in one place. The applications also carry the noise and the precision expectations, because the 5-volt rail that feeds a logic block is tolerant of the regulator's ripple while the rail that feeds an analog front end reads the decoupling and the noise the datasheet describes. The output maps the parts to the jobs, and the jobs are the concrete face of the comparison that the guide's later sections refine with the current, the dropout, and the thermal.
Which rail each regulator suits best
The LM7805 suits the rail that needs exactly 5 volts, and it serves it with the fewest parts, the fixed accuracy, and the standard pinout, which is the 5-volt logic rail, the sensor supply, and the module supply derived from a higher input. The LM317 suits the rail that needs a value that is not 5 volts, or a value that the design adjusts, and it serves it with one part and two resistors, which is the adjustable bench supply, the 3.3-volt rail in a pinch, and the odd voltage the fixed catalog does not offer. The overlap is the 5-volt rail that the LM317 can also serve, and the tiebreaker is the design's other needs, the part count, the dropout, and the sourcing depth. The rule is to choose the part that fits the rail's value and the design's simplicity, and the rule is the first application verdict of the comparison.
Current, Dropout, and Input Range: LM7805 vs LM317
The current and the dropout of the two parts are the same family numbers, and the comparison reads them as shared rather than as differences. Both deliver up to about 1.5 amps with the adequate heat sinking, both need the classic dropout of roughly 2 volts between the input and the output, and both operate from an input up to about 35 volts absolute and comfortably in the standard range, so a 5-volt 7805 needs about 7 volts on its input and an LM317 set to 5 volts needs the same headroom. The dropout is the boundary of both parts, and it is the reason neither is the right choice for a rail that runs close to its input, where the LDO family takes over. The current is the shared rating, and the thermal is the limit of the current, because the dissipation at, say, a 12-volt input and a 1-amp load is about 7 watts in a part rated to shed it with a heatsink, and neither part changes that arithmetic. The current and the dropout are the shared boundary of the family, and the comparison honors the boundary rather than pretending the parts differ here.
The input range and the protection are also shared, and they are the reliability layer of the comparison. Both parts carry the internal current limiting and the thermal shutdown, which protect the part and the load under the short-circuit and the overload, and both need the input and the output capacitors that the datasheet specifies to suppress the oscillation and the transients. The design also protects the regulator from the reverse and the surge conditions that the input can present, with the protection diode where the datasheet recommends it. The comparison reads the protection as the shared reliability of the family, and the thermal calculation as the shared limit, and the selection between the LM7805 and the LM317 is therefore not a reliability contest, it is a design fit contest on the output and the simplicity. The current, the dropout, the input range, and the protection are the family's common ground, and the guide's remaining sections read the differences that decide the fit.
How the dropout affects both parts at low input
The dropout of about 2 volts sets the minimum input for both parts, and the low-input behavior is where the LDO family enters the comparison. A 5-volt rail from a 7805 needs the input above about 7 volts, and the input ripples or sags below that, the output drops out of regulation and follows the input with the residual. An LM317 set to 5 volts needs the same headroom, so the low-input rail that must run from a 5.2-volt source, a battery near its cutoff, or a tight adapter, cannot use either part and turns to the LDO, the AMS1117 and the LM1117, whose dropout is a few hundred millivolts. The dropout read is the boundary that keeps the LM7805 and the LM317 in the rails with the generous headroom, and it is the boundary that the guide states when the comparison broadens to the regulator families. The low-input rail is the LDO's home, and the 7805 and the 317 serve the rails above their dropout with the simplicity that the LDO does not always match.
Package and Thermal: LM7805 vs LM317
The package and the thermal story of the two parts is the same story, and it decides the current the design can actually draw. Both parts ship in the TO-220, the through-hole package with the metal tab that doubles as a heatsink mount, and in the surface-mount variants, the DPAK and its kin, and the thermal resistance of the package and the board decides how much heat the part sheds. The dissipated power is the input-minus-output difference times the current, and the junction temperature is the ambient plus the power times the thermal resistance, and the current that the design draws is limited by the temperature that the package reaches. A 12-volt input and a 1-amp 5-volt rail dissipates 7 watts, which a TO-220 with a proper heatsink sheds and a bare TO-220 in still air cannot, so the thermal design, the heatsink, the board copper, and the airflow, is the real rating of both parts. The package and the thermal are the shared engineering of the comparison, and the selection reads them against the load that the design draws.
The thermal read also guides the package choice between the TO-220 and the surface-mount variants. The TO-220 with a heatsink serves the multi-watt rails, and the DPAK and the SOT-223 serve the lower-power rails with the board copper as the heatsink, and the selection matches the package to the dissipated power. The comparison of the LM7805 and the LM317 is the same package map, because the parts share the package options, and the thermal calculation is the same, because the dissipation is the same arithmetic. The guide therefore reads the thermal once for both parts, and the read is the discipline that keeps a 1.5-amp regulator from cooking its way out of the design. The thermal is the honest limit of the family, and the package is the physical answer to the limit, and the selection respects both.
How to heatsink a TO-220 regulator
Heatsinking a TO-220 regulator is the mechanical half of the thermal design, and it follows the thermal model. Mount a TO-220 to a heatsink with the thermal interface, the thermal pad or the grease, between the tab and the heatsink, and use the screw or the clip that the heatsink datasheet specifies, and the case-to-ambient resistance of the assembly replaces the free-air number in the junction calculation. Size the heatsink so that the junction stays below the rating at the worst-case ambient and load, using the powers and the resistances the model sums, and leave the headroom for the real board and the real airflow. For the surface-mount variants, the DPAK, the board copper and the thermal vias under the tab are the heatsink, and the layout carries the heat to the board. The heatsink read is the completion of the thermal calculation, and it is the difference between a regulator that holds its rail and a regulator that shuts down at the worst case.
When to Choose the LM7805
Choose the LM7805 when the rail is exactly 5 volts, because the fixed part delivers that rail with the fewest parts, the factory-trimmed accuracy, and the simplest layout. Choose it when the design values the simplicity of the two-capacitor rail, when the board's space matters and the regulator should be one part rather than a part plus a divider, and when the input has the generous headroom that the 2-volt dropout needs. Choose it for the 5-volt logic and the sensor and the module rails that the 78xx family has served for decades, because the 7805's application map is the 5-volt world, and the design that lives in that world chooses the part that lives there with it. The LM7805 is the answer to the 5-volt question, and the comparison's rule is to let the fixed part own the fixed rail.
The 7805 choice also brings the family's replacement depth, because the 78xx pinout is the most standardized three-terminal layout in electronics. A board that chooses the 7805 can be sourced from the LM7805, the L7805, the KA7805, and the field of domestic parts on the same TO-220 or surface-mount footprint, and the sourcing and the qualification are the replacement view that this guide's family is built on. The choice of the LM7805 is therefore a choice of the family and its market, and the supply is secured by the depth that the family's standardization created. The 7805's story is the fixed rail and the deep family, and the guide's view is the same, the right rail, the simplest part, and the deep supply.
When to Choose the LM317
Choose the LM317 when the rail is not 5 volts, because the adjustable part serves any value from about 1.25 volts up to its input minus the dropout, with one part and two resistors. Choose it when the design anticipates a value change, a bench supply whose knob turns, a prototype whose rail adjusts, or a product line whose boards share one regulator across several voltages, because the LM317 turns the value by a resistor rather than by a new part. Choose it when the board needs a value the fixed catalog does not carry, the 3.3-volt in a pinch or the 6-volt or the custom rail, because the one part covers the gap that the fixed catalog leaves. The LM317 is the answer to the flexible rail, and the comparison's rule is to let the adjustable part own the value that the fixed catalog does not.
The LM317 choice also reads its application character, because the adjustable part is the workhorse of the bench and the one-size-fits-many rail. The datasheet's application circuits, the current limiter, the battery charger, the adjustable supply with the metering, and the precision variation with the resistor tolerance, show the part's reach, and the design that needs the reach chooses the part. The LM317 also has its replacement family, because the three-terminal adjustable layout is standardized across the vendors and the domestic parts, so the supply is secured the way the 78xx's is, by the family's depth. The LM317's story is the flexible rail and the bench, and the guide's view matches, the right value, the one part, and the deep family.
Worked Rail Design: A 5-Volt Fixed Rail and an Adjustable Rail
Designing a rail around the LM7805 and the LM317 is the worked example that turns the comparison into a board, and it starts with the arithmetic each part performs. Take a 12-volt input and a 5-volt, 500-milliamp output with the LM7805: the fixed part needs its input, its ground, and its output, the input capacitor in the 0.33-microfarad class and the output capacitor in the 0.1-microfarad class that the datasheet specifies, and the output is a factory-trimmed 5 volts with no divider and no adjustment. The dropout margin is the first check, the 2-volt-class dropout against the 7-volt headroom, which is generous, and the thermal is the second, the dissipation is the input-minus-output difference times the current, 7 volts times 0.5 amp, about 3.5 watts, which a TO-220 with a heatsink sheds and a bare TO-220 in still air cannot, as the next section's calculation shows. Take the same input and an adjustable 12-volt rail with the LM317: the output is set by the divider, the formula being 1.25 times one plus the ratio of the two resistors, so a resistor pair of 240 ohms and 2.2 kilohms sets the output near 12.7 volts, and the divider's tolerance joins the output tolerance. The two worked rails show the parts' characters, the fixed part's simplicity against the adjustable part's one-part-many-voltages, and both start from the same three-terminal wiring.
The worked rails also carry the protection and the layout that the datasheet's application section describes. The input capacitor sits close to the input pin, the output capacitor close to the output, and the protection diode from the output to the input protects the regulator when the output holds its charge and the input drops, a real condition in a bench supply or a load that can back-drive the rail. The ground wiring is the quiet reference, the load returns near the regulator's ground rather than across a long trace, and the output sense is short. The LM317's adjustable version adds the adjust-pin bypass capacitor that the datasheet recommends, to reduce the output ripple that the adjust current and the noise inject. The layout discipline is the same for both parts and it is the half of the design that the two-capacitor schematic hides, because a regulator that oscillates is usually a layout or a capacitor problem rather than a part problem. The worked rails are the path from the datasheet to the board, and they are the same path for the fixed and the adjustable regulator.
A worked resistor-divider calculation for the LM317
The resistor-divider calculation for the LM317 is the small arithmetic that sets the adjustable output, and it is worth a worked example because the ratio is the part's soul. The formula is the output equals 1.25 times one plus the ratio of the upper to the lower resistor, and the designer picks the lower resistor to set the divider current, the classic values being a 240-ohm lower resistor that draws the reference current comfortably above the adjust pin's minimum, then solves for the upper. For a 5-volt output, the ratio is the output over 1.25 minus one, 3, so the upper resistor is three times the lower, 720 ohms with a 240-ohm lower, and a standard 750-ohm upper lands the output near 5.16 volts, within the divider tolerance. For a 12-volt output, the ratio is 12 over 1.25 minus one, 8.6, so the upper resistor is 8.6 times 240 ohms, about 2.06 kilohms, and a 2.2-kilohm standard lands the output near 12.7 volts. The divider's tolerance, the resistor's temperature coefficient, and the adjust pin's voltage all join the output accuracy, which is why the adjustable rail carries a wider tolerance than the fixed one. The calculation is the LM317's working face, and it is the face the comparison's flexibility rests on.
Thermal: A Worked Dissipation Calculation for a Linear Regulator
The thermal calculation is the number that decides whether a linear rail is feasible, and the worked example for the 5-volt rail shows the family's honest limit. At the 12-volt input, the 5-volt output, and the 500-milliamp load, the dissipation is the 7-volt difference times the 0.5 amp, 3.5 watts, and the junction temperature is the ambient plus the dissipation times the thermal resistance of the package and its heatsink. A bare TO-220 in still air carries a junction-to-ambient resistance in the 50-degree-per-watt class, which puts the junction at 25 degrees plus 3.5 times 50, 200 degrees, far over the 125-degree rating, so a bare TO-220 cannot run this rail at all. A TO-220 on a small heatsink brings the resistance to the 15-degree-per-watt class, a junction near 25 plus 52, 77 degrees, inside the rating and comfortable, and a large heatsink or the forced air brings it lower. The arithmetic is the reason the same rail on a 9-volt input, a 4-volt difference and a 2-watt dissipation, runs on the smaller heatsink, and the rail on a 24-volt input, a 19-volt difference and a 9.5-watt dissipation, needs the serious heatsink or the switching regulator. The thermal read is the gate of the linear selection, and it is the gate the comparison's high-drop rails hit first.
The LM317 on the adjustable rail runs the same arithmetic with its own drop, and the comparison between the two parts is not a thermal contest because the numbers follow the drop and the current rather than the part. The 7805 at a 7-volt drop and the LM317 set to 5 volts at the same drop dissipate the same watts, and the heatsink that sheds one sheds the other. The thermal design that the worked example shows is therefore the family's shared discipline, and the selection between the fixed and the adjustable parts is decided by the output and the simplicity rather than by the heat. The thermal read also sets the practical current of any linear rail, because the usable amps are the watts the package can shed divided by the drop, and the designer who reads the watts before the current keeps the rail inside its rating. The heatsink sizing follows the same model: a 3.5-watt rail with a target junction of 100 degrees at a 25-degree ambient has a budget of 75 degrees, so the total thermal resistance, junction-to-case plus case-to-sink plus sink-to-air, must stay at or below 75 divided by 3.5, about 21 degrees per watt, and a TO-220's junction-to-case of a few degrees per watt plus a small clip-on heatsink in the 15-degree-per-watt class lands the budget inside it. The worked calculation is the honest number behind the linear regulator's simplicity, and it is the number the selection and the heatsink both use.
Measuring a Linear Regulator on the Bench
Measuring the LM7805 or the LM317 on the bench is the confirmation that the rail holds its spec, and the procedure is the same for both parts. Measure the output accuracy first, the multimeter across the output at the no-load and the full-load current, and compare the readings against the nominal and the datasheet's tolerance, the fixed part's factory-trimmed 5 volts and the adjustable part's divider-set value, and the difference is the load regulation and the divider tolerance. Measure the load regulation next, holding the input and stepping the load from zero to the rating and recording the output change, and measure the line regulation, holding the load and stepping the input across its range, and the two numbers state how well the part holds the rail against the real world. Measure the ripple with the scope AC-coupled across the output, expecting the low millivolt class from a linear regulator, and compare the read against the datasheet's ripple-rejection behavior. The measurements are recorded beside the design values, and the record is the evidence the change doc carries, which is the same discipline the series applies to every rail.
The measurement also reads the transient and the protection behavior that the datasheet describes. Apply a load step and watch the output's recovery, and exercise the short-circuit and the thermal protection by overloading the part briefly and watching the current fold back and the output drop, and confirm the protection engages rather than letting the part destroy itself. The transient and the protection reads are the behaviors that a stable rail takes for granted until they fail, and the bench is the place to confirm them before the product ships. The measurement procedure is the same for the fixed and the adjustable versions, with the divider's tolerance read into the adjustable one's accuracy, and it is the procedure that turns the LM7805 versus LM317 choice from a datasheet reading into a measured decision. The bench is the referee of the rail, and the record is the referee's verdict, which is the evidence the production reviewer and the auditor both read.
Troubleshooting Linear Regulator Problems
The linear regulator problems that appear on a new board are consistent, and the troubleshooting runs on a short list. If the output is absent, check the input is present and the ground is connected, check the input capacitor is the correct value and close, and check the part's orientation, because a reversed TO-220 or a wrong ground connection produces no rail. If the output is wrong, check the part's number, a 7812 does not output 5 volts, and check the adjustable divider, the resistor values and their soldering, because a wrong divider sets a wrong output. If the part overheats, check the drop and the current, the watts the thermal section calculated, and the heatsink and the board copper, because a 3.5-watt rail on a bare TO-220 cooks. If the output oscillates or carries the ripple, check the input and the output capacitors and their placement, because a missing or a distant capacitor breaks the loop's stability, and check the adjust-pin bypass on the LM317. If the output sags under the load, check the current against the part's derated reality and the input against the dropout, because a regulator run at its limit or its margin collapses under the step. The troubleshooting list is the practical bookend to the design, and it is the checklist a designer keeps for the first board of every linear rail, on the fixed part and on the adjustable one alike. The reverse-polarity and the surge protection complete the reliability read, because a regulator fed the wrong polarity or a voltage spike past its absolute maximum can fail without it, and the datasheet's application section shows the input-protection diode and the transient suppressor where the input can be abused.
LM7805 vs LM317: Equivalents and Replacements
The replacement view of the LM7805 vs LM317 comparison is the sourcing that both choices open, and it is the same view for both parts. The LM7805 sits in the 78xx family, whose three-pin layout every vendor and a field of domestic parts reproduce, and the LM317 sits in the adjustable family that the market also standardizes on, so both designs have a deep, pin-compatible replacement market. The replacement qualification runs the same discipline as any substitution: confirm the package and the pinout, the TO-220 or the surface-mount variant, confirm the output, 5 volts for the 7805 and the divider setting for the LM317, confirm the current and the dropout and the thermal, and test the replacement on the board across the temperature range. The replacement is pin-compatible because the layouts are standardized, and the sourcing is deep because the families are old and wide, which is the combination that makes the regulator comparison friendly to the supply chain.
The comparison also touches the LDO family that sits beside both parts, because the AMS1117 and the LM1117 serve the low-dropout rails that the 7805 and the 317 cannot. A rail that must regulate from a tight headroom, a battery near its cutoff, reads the LDO instead, and a rail with the generous headroom reads the 7805 or the 317 for the simplicity and the cost. The three families, the fixed regulator, the adjustable regulator, and the LDO, are the working vocabulary of the linear power block, and the comparison of the 7805 and the 317 is the map between the two ends of that vocabulary. A designer who reads the LM7805 vs LM317 comparison this way selects the fixed part or the adjustable part on the output, the current, and the thermal, and the selection is the working answer that the schematic and the board both accept.
Not sure which sensor fits your project?
Talk to our mmWave application engineers for a free consultation.
Specify your hotel project with our engineers
Send your room count, ceiling type, and protocol preference. We will return a sample plan and quote within 24 business hours.
- Move from general guidance into a product or application discussion.
- Use RFQ when pricing, drawings, MOQ, or launch timing needs structure.
- Keep a direct contact path visible for fast clarifications and handoff.