War. Natural disasters. Congressional infighting. Any of these can wreck the public perception of a presidential administration. Presidents are also often judged -- fairly or not -- by how the stock market performs during their time in office.

By examining each presidency by the numbers, we'll see what lessons investors can learn, and how it can help them become smarter, happier, and richer.

The White House lectern.

Image source: Getty Images.

George W. Bush (2001-2009)

George W. Bush was sworn into office at noon on Saturday, Jan. 20, 2001 -- the day and time set by the Constitution -- with the S&P 500 having slipped about 12% from its all-time high as the dot-com bubble began to burst.  Over the next several months, financial conditions continued to deteriorate, spurred on by a series of financial scandals, the start of a formal recession, and the terrorist attacks on Sept. 11, 2001. All told, the S&P 500 would bottom out in late 2002, down nearly 50%.

The gray bars in the charts in this article indicate U.S. recessions.

^SPX Chart

^SPX data by YCharts

Despite this rocky period, the economy bounced back and the market reclaimed all its losses and more. By the start of 2007, the S&P 500 had increased more than 25% since the start of Bush's presidency.

Yet, storm clouds were gathering. The stock market peaked in mid-2007 and investment banks Bear Stearns and Lehman Brothers collapsed the following year, leading to the Great Recession.

Bush left office near the bottom of the downturn. Overall, the stock market as measured by the S&P 500 dropped almost 31% during his term. So buying on Day 1 of his administration and selling on the last day, would not have turned out to be a money-making move. However, investors who bought shares of the S&P 500 on his first day as president and held until today would have been handsomely rewarded.

A $10,000 investment would now be worth about $60,000, representing a compound annual growth rate (CAGR) of 8%.

Time Frame Value of $10,000 Investment Total Return Compound Annual Growth Rate
Jan. 20, 2001 - Jan. 20, 2009 $6,936 (30.64%) (4.5%)
Jan. 20, 2001 - May 17, 2024 $61,770 517% 8.2%

Barack Obama (2009-2017)

Barack Obama was sworn in as the 44th president on Tuesday, Jan. 20, 2009. The stock market was in the middle of a prolonged bear market, and the country was mired in a deep recession due to the financial crisis of 2008.

^SPX Chart

^SPX data by YCharts

However, those initial disadvantages would become positives over the long run. The 2007-2009 bear market bottomed in March 2009, and a long bull market began, which would last for more than a decade.

Sure, there were stock market corrections along the way, brought on by numerous events, including several Greek debt crises, the U.S. debt ceiling crisis of 2011, and the Brexit referendum vote.

Nevertheless, by the end of Obama's term in 2017, the S&P 500 had generated a total return of 235%, equating to an annualized rate of 16%. A $10,000 investment in the S&P 500 on Day 1 of his presidency would have been worth $33,500 on the final day, and it would now be worth $89,000.

Indeed, among presidents dating back to 1900, Obama's stock market record ranks near the top of the list. Only Calvin Coolidge (1923-1929) and Bill Clinton (1993-2001) can claim a larger percentage gain in the stock market during their terms.

Time Frame Value of $10,000 Investment Total Return Compound Annual Growth Rate
Jan. 20, 2009 - Jan. 20, 2017 $33,510 235% 16.3%
Jan. 20, 2009 - May 17, 2024 $89,050 790% 15.7%

Donald Trump (2017-2021)

Donald Trump was sworn in as president on Friday, Jan. 20, 2017. During his time in office, the stock market experienced enormous highs and lows. However, the timing of the downturns might surprise some investors.

^SPX Chart

^SPX data by YCharts

For example, during Trump's presidency, the stock market experienced three fantastic years and one bad year -- assuming you start the years on Jan. 20 (to line up with Inauguration Day). The up years were 2017, 2019, and, surprisingly, 2020 -- despite the steep sell-off at the start of the COVID pandemic. It was 2018 -- when the Federal Reserve began tightening monetary policy -- that was the worst year during the Trump presidency. That 12-month period year saw the S&P 500 decline by 3.1%.

All told, the stock market returned 83.3% over Trump's four years, working out to a 16.4% CAGR -- the highest annualized rate out of the four most recent presidents.

Time Frame Value of $10,000 Investment Total Return Compound Annual Growth Rate
Jan. 20, 2017 - Jan. 20, 2021 $18,330 83.28% 16.4%
Jan. 20, 2017 - May 17, 2024 $26,580 166% 15%

Joe Biden (2021-)

President Joe Biden assumed office on Wednesday, Jan. 20, 2021. During his roughly three and a half years in office, the stock market has performed something like a three-act play. It went up; it went down; then it recovered.

^SPX Chart

^SPX data by YCharts

When you tally it all up, you find that the result is above average -- an annualized return of 12% and an overall return of 45%. A $10,000 investment made on Day 1 of his presidency would now be worth $14,500.

Yet, the big economic story of the Biden administration is something you won't see in the stock market returns: inflation. Unlike the other administrations mentioned above, the Biden presidency has seen persistently high inflation. In response, the Federal Reserve has quickly raised interest rates in a bid to stabilize prices.

In other words, the stock market is up under the Biden administration. But, for many investors, it may not feel that way, and inflation, combined with higher interest rates, are the biggest reasons why.

Time Frame Value of $10,000 Investment Total Return Compound Annual Growth Rate
Jan. 20, 2021 - present $14,500 45% 11.9%

The final tally

When you zoom out to the big picture, one thing becomes clear: It's never a bad time to invest -- no matter who the president may be.

President Compound Annual Growth Rate
(During Term)
Compound Annual Growth Rate
(Since Inauguration)
Value of $10,000 Day 1 Investment at end Term Value of $10,000 Day 1 Investment Now
George W. Bush (4.5%) 8.2% $6,936 $61,770
Barack Obama 16.3% 15.7% $33,510 $89,050
Donald Trump 16.4% 15% $18,330 $26,580
Joe Biden* 11.9% 11.9% $14,500* $14,500

*Term not complete.

As the table above shows (top results are in bold), Day 1 investors in the S&P 500 would have made money in three of the last four administrations if they'd sold on the last day of the administration. In all cases, buying on Day 1 and continuing to hold, would have resulted in positive returns.

Clearly, there's a lesson: The longer you stay invested in the stock market, the better your chances of success. And that's a lesson investors can take to the bank -- no matter who is in the White House.