The numbers are in, and no matter how you look at them, 2012 was a way better year for stocks than 2011. Last year’s stock market performance was particularly impressive given all the end-of-year fiscal cliff fear, pre-election uncertainty and ongoing sovereign debt problems in Europe. 2012 was a surprisingly fruitful year to be an investor. Here are some key numbers to demonstrate just how strong the stock market performance was: The S&P 500 gained 13.4% , marking the benchmark U.S. index’s largest annual return since 2009 and fourth-largest return in the last decade. The Nasdaq Composite Index was up nearly 16%. That’s a vast improvement from a year ago, when the tech-heavy index fell 1.8%. 128 companies went public – the second-highest IPO total in the last five years. It was a good year for small cap stocks too. The Russell 2000 Index, which gauges U.S. small caps, returned 14.7% this year. Despite a late-year slump, Apple (NASDAQ: AAPL), the world’s largest stock, gained 31% – topping $700 for the first time in its history at one point. Bank of America (NYSE: BAC) was one of the year’s biggest gainers, rising more than 100%. BAC’s move headlined a nice bounce-back year for the big banks. Shares of the six largest U.S. financial institutions gained an average of 40% in 2012.