Investment banking giant Goldman Sachs (NYSE:GS) was one of the first companies to report its first-quarter 2021 results, and the company certainly set a high bar. Not only did the company handily surpass analysts' expectations, but the bank's first-quarter revenue and earnings were the highest they've ever been.

On the top line, Goldman generated $17.7 billion in revenue, more than $5 billion better than analysts had been looking for. And there were a few good reasons for this. The IPO market has been exceptionally strong -- especially in the SPAC world, as we saw hundreds of blank check companies go public in the first quarter. As a result, Goldman's investment banking revenue soared by 73% year over year.

Two businessmen looking at financial data on screens.

Image source: Getty Images.

Trading revenue, which is Goldman's largest revenue source, was a particularly strong point as well. Helped by high market volatility and rising fixed income interest rates, trading revenue climbed by 47% from the first quarter of last year, which itself was a volatile and strong quarter for trading.

Consumer banking is still a relatively small part of Goldman's business, but it continues to grow rapidly as the Marcus savings and loan platform and Goldman's credit card business expand. In the first quarter, consumer banking revenue grew by 32% year over year, and it is certainly an area to watch going forward.

Finally, Goldman shattered expectations on the bottom line with $18.60 per share of earnings, well ahead of the $10.22 that had been projected. For reference, Goldman earned $24.74 for the entire year of 2020.

To be sure, investors shouldn't expect the first quarter's performance to repeat throughout the rest of the year. The IPO market (especially SPACs) has cooled off significantly, and market volatility on both the equities and fixed income sides is relatively low compared to the first quarter. Even so, this was an absolute blowout quarter for Goldman Sachs, and the bank stock's investors should be very pleased with the results.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.