Companies are unveiling plans to repurchase their own shares at a record pace, lending support to the battered stock market.

Firms in the S&P 500 have outlined buyback plans valued at $238 billion through the first two months of 2022, according to data from Goldman Sachs Group Inc. , a high for this point in the year.

They appear to be taking advantage of the volatility that has rattled markets lately. Stocks have come under pressure this year on worries about the pace of the Federal Reserve’s plan to raise interest rates, Russia’s invasion of Ukraine and a surge in commodity prices that could stall the economy. The S&P 500 is down 11% year to date.

Repurchases can support stocks by reducing a company’s share count, boosting its per-share profit. And they can boost investor sentiment by suggesting executives are optimistic about their companies’ prospects and confident in their financial position.

“It does add a layer of overall support during periods of volatility,” said Anthony Saglimbene, global market strategist at Ameriprise Financial.

Union Pacific Corp. has led the way, outlining plans for a stock-buyback plan valued at roughly $25 billion, while PepsiCo Inc. and industrial-gas company Linde PLC said they plan to repurchase as much as $10 billion in stock.

The surge of activity has continued in March. Amazon.com Inc. said last week that it would buy back as much as $10 billion in shares, while Colgate-Palmolive Co. and Best Buy Co. unveiled $5 billion plans.

Goldman analysts recently raised their 2022 forecasts for buybacks to a record $1 trillion, which would represent a 12% increase from last year when repurchase activity helped propel the S&P 500 to a 27% gain.

The analysts said the breadth of buyback activity is near a historic high, with the number of active programs double the typical figure.

SHARE YOUR THOUGHTS

Do you expect the strong pace of stock buybacks to continue? Why, or why not? Join the conversation below.

To be sure, some investors worry that buybacks redirect corporate spending away from capital expenditures, research and development, and workers’ wages—advancing stock prices in the short run at the expense of long-term growth.

In mid-December, the Securities and Exchange Commission proposed greater disclosure requirements on buybacks, which would compel companies to detail their rationale and the criteria used to determine the amount of shares to be repurchased. 

This hasn’t stopped companies from planning more buybacks this year. 

“Companies have created, in the last six to twelve months, something of a fortress in their balance sheets,” said Jessica Bemer, portfolio manager at Easterly Investment Partners. “They’re able to defend their company in a way that gives us some comfort as we move through the uncertainty.”

Write to Hardika Singh at hardika.singh@wsj.com