Getty

U.S.-listed stocks returned more than $1.2 trillion to investors last year, according to data published Monday by S&P Dow Jones Indices, with companies buying back a record $806.4 billion in shares thanks in part to a corporate tax windfall and a sharp market pullback in the final three months of the year.

Total S&P 500 shareholder returns hit a record $1.263 trillion, S&P Dow Jones Indices said, up nearly 35% from the 2017 tally. Dividend payments over the fourth quarter rose to a record $119.8 billion, the group said, up 3.5% from the three months ending in October. The bulk of fourth quarter returns, however, came via share buybacks, which hit a record $223 billion.

"Buybacks were again favored over dividends in both the rate of growth and aggregate dollars spent," said S&P Dow Jones Indices analysts Howard Silverblatt. "Companies continued to spend more of their tax savings on these share repurchases as they boosted earnings through significantly reduced share counts."

"Adding to the share reduction, and therefore the EPS impact, was Q4's stock price decline, which permitted companies to buy even more shares for their dollars and reduce share count more efficiently," he added, noting the 5.3% fourth quarter decline for the broadest measure of U.S. stocks.

Tech stock buybacks led the 2018 gains, despite a fourth quarter slump, with the sector comprising nearly a third of the S&P 500 buybacks at at total of $278.5 billion. Apple Inc. (AAPL - Get Report) was the tech sector's biggest buyer, snapping up $74.2 billion for the whole of calendar 2018, taking its five year total to $229 billion.

Oracle (ORCL - Get Report) , which bought back $29.3 billion shares last year, and Microsoft (MSFT - Get Report) , which retired $29.3 billion, were the sector's biggest contributors, S&P Dow Jones.

Heatlhcare was second at $108.7 billion for the year, followed by consumer discretionary stocks at $86.7 billion and consumer staples stocks at $33.4 billion. Merck & Co. (MRK - Get Report) paced the healthcare sector with $9.1 billion in buybacks, more than double its 2017 tally.