The end of the boom is in sight for America’s fracking companies.

Less than 3½ years after the shale revolution made the U.S. the world’s largest oil producer, companies in the oil fields of Texas, New Mexico and North Dakota have tapped many of their best wells.

If the largest shale drillers kept their output roughly flat, as they have during the pandemic, many could continue drilling profitable wells for a decade or two, according to a Wall Street Journal review of inventory data and analyses. If they boosted production 30% a year—the pre-pandemic growth rate in the Permian Basin, the country’s biggest oil field—they would run out of prime drilling locations in just a few years.

Shale companies once drilled rapidly in pursuit of breakneck growth. Now the industry has little choice but to keep running in place. Many are holding back on increasing production, despite the highest oil prices in years and requests from the White House that they drill more.

The limited inventory suggests that the era in which U.S. shale companies could quickly flood the world with oil is receding, and that market power is shifting back to other producers, many overseas. Some investors and energy executives said concerns about inventory likely motivated a recent spate of acquisitions and will lead to more consolidation.

Some companies say concerns about inventories haven’t factored into their decisions to keep output roughly flat. For several years before the pandemic, frustrated investors had pressured companies to slow production growth and return cash to shareholders rather than pump it back into drilling. Companies have promised to limit spending, though some executives recently said high prices signal a need for them to expand again this year.

U.S. oil productionSource: Energy Information AdministrationNote: U.S. total includes federal offshore sites
2010’15’2002.55.07.510.012.515.0million barrels per day

U.S. oil production, now at about 11.5 million barrels a day, is still well below its high in early 2020 of about 13 million barrels a day. The Energy Information Administration expects U.S. production to grow about 5.4% through the end of 2022.

Big shale companies already have to drill hundreds of wells each year just to keep production flat. Shale wells produce prodigiously early on, but their production declines rapidly. The Journal reported in 2019 that thousands of shale wells were pumping less oil and gas than companies had forecast. Many have since marked down how many drilling locations they have left.

Some shale companies will eventually have to start spending money to explore for new hot spots, executives and investors said, and even then, those efforts are likely to add only incremental inventory. Few are currently doing so.

Pioneer Natural Resources Co. , the largest oil producer in the Permian Basin of West Texas and New Mexico, raised its oil production between 19% and 27% a year in shale’s peak years. Now, Pioneer is planning to increase output only 5% a year or lower, for the long term.

Scott Sheffield, chief executive of Pioneer, said the combination of investor pressure and limited well inventory means he cannot drill as he once did. “You just can’t keep growing 15% to 20% a year,” he said. “You’ll drill up your inventories. Even the good companies.”

Pioneer bought two smaller drillers last year, Parsley Energy Inc. and DoublePoint Energy, in deals valued at almost $11 billion combined. Mr. Sheffield said that with those acquisitions, his company has about 15 to 20 years left of inventory. Pioneer’s pool of potential drilling locations would last only about eight years at a 15% to 20% growth rate, he said.

While privately held oil producers have increased their output in the Permian this past year, Mr. Sheffield warned even the largest of those would drill through their inventory rapidly if they kept it up.

Mr. Sheffield said he expects U.S. oil production to grow around 2% to 3% a year, even if oil trades from $70 to $100 a barrel. U.S. oil prices settled at $88.26 a barrel Wednesday.

Many drillers say they will never return to pre-pandemic production growth levels of up to 30% a year, in part due to rising costs for raw materials and labor, a lack of available financing and the enormous number of new wells it would require.

Five of the largest shale companies— EOG Resources Inc., Devon Energy Corp. , Diamondback Energy Inc., Continental Resources Inc. and Marathon Oil Corp. —all have about a decade or more of profitable well sites at their current drilling pace, according to the Journal’s review.

They would exhaust that inventory within about six years if they grew output 15% a year, according to analytics firm FLOW Partners LLC, which provided one of the analyses the Journal reviewed..