The Dow Jones Industrial Average rose 55.47 points, or 0.26 per cent, to 21,006.94, the S&P 500 gained 9.77 points, or 0.41 per cent, to 2,399.29 and the Nasdaq Composite added 25.42 points, or 0.42 per cent, to 6,100.76.
All three indexes posted gains for a third straight week.
After seven sessions of not moving more than 0.2 per cent in either direction, the S&P 500 eclipsed that range on Friday as stocks strengthened late in the day.
The S&P 500 has gained 12.1 per cent since President Donald Trump's November 8 election, fuelled by his plans for tax cuts, infrastructure spending and deregulation. But the rally had slowed as some investors questioned Trump's ability to enact his agenda.
The Federal Reserve left interest rates unchanged at its policy meeting this week. The central bank downplayed weak first-quarter economic growth while emphasising the strong labour market, in a sign it was still on track for two more rate rises this year. Investors are pricing in a 75 per cent chance of a hike in June, according to Thomson Reuters data.
In corporate news, IBM shares fell 2.5 per cent after Warren Buffett said he sold about one-third of Berkshire Hathaway Inc's stake in the company.
Earnings season has come in generally above expectations, encouraging investors. First-quarter profits at S&P 500 companies are estimated to have increased 14.7 per cent, the strongest since 2011, according to Thomson Reuters I/B/E/S.
Shares of health insurer Cigna and IT services provider Cognizant rose after their respective reports.
Advancing issues outnumbered declining ones on the NYSE by a 2.66-to-1 ratio; on Nasdaq, a 1.39-to-1 ratio favoured advancers.
The S&P 500 posted 55 new 52-week highs and no new lows; the Nasdaq Composite recorded 123 new highs and 67 new lows.
About 6.5 billion shares changed hands in U.S. exchanges, just below the 6.6 billion daily average over the last 20 sessions.