One night I (in 2011) I was thinking about Obama's upcoming re-election campaign. There's a general advantage attributed to a sitting president running for election, a sort of "devil you know" derivation - but I wanted to measure a few different things about this.
First, how often did incumbent presidents win or lose elections?
Incumbent Presidents
| Name | Party | Years | Terms | Ran | Nominated | Won |
| George Washington | None | 1789-1797 | 2 | Y | Y | Y |
| John Adams | Federalist | 1797-1801 | 1 | Y | Y | N |
| Thomas Jefferson | Democratic-Republican | 1801-1809 | 2 | Y | Y | Y |
| James Madison | Democratic-Republican | 1809-1817 | 2 | Y | Y | Y |
| James Monroe | Democratic-Republican | 1817-1825 | 2 | Y | Y | Y |
| John Quincy Adams | National Republican | 1825-1829 | 1 | Y | Y | N |
| Andrew Jackson | Democratic | 1829-1837 | 2 | Y | Y | Y |
| Martin Van Buren | Democratic | 1837-1841 | 1 | Y | Y | N |
| John Tyler | Whig | 1841-1845 | 1 | Y | N | - |
| James K. Polk | Democratic | 1845-1849 | 1 | N | - | - |
| Millard Fillmore | Whig | 1850-1853 | 1 | Y | N | - |
| Franklin Pierce | Democratic | 1853-1857 | 1 | Y | N | - |
| James Buchanan | Democratic | 1857-1861 | 1 | N | - | - |
| Abraham Lincoln | Republican | 1861-1865 | 2 | Y | Y | Y |
| Andrew Johnson | Democratic | 1865-1869 | 1 | Y | N | - |
| Uylesses S. Grant | Republican | 1869-1877 | 2 | Y | Y | Y |
| Rutheford B. Hayes | Republican | 1877-1881 | 1 | N | - | - |
| Chester A. Arthur | Republican | 1881-1885 | 1 | Y | N | - |
| Grover Cleveland | Democratic | 1885-1889 | 1 | Y | Y | N |
| Benjamin Harrison | Republican | 1889-1893 | 1 | Y | Y | N |
| Grover Cleveland | Democratic | 1893-1897 | 1 | N | - | - |
| William McKinley | Republican | 1897-1901 | 2 | Y | Y | Y |
| Theodore Roosevelt | Republican | 1901-1909 | 2 | Y | Y | Y |
| William Howard Taft | Republican | 1909-1913 | 1 | Y | Y | N |
| Woodrow Wilson | Democratic | 1913-1921 | 2 | Y | Y | Y |
| Calvin Coolidge | Republican | 1923-1929 | 2 | Y | Y | Y |
| Herbert Hoover | Republican | 1929-1933 | 1 | Y | Y | N |
| Franklin Delano Roosevelt | Democratic | 1933-1945 | 3 | Y | Y | Y |
| Harry S. Truman | Democratic | 1945-1953 | 2 | Y | Y | Y |
| Dwight D. Eisenhower | Republican | 1953-1961 | 2 | Y | Y | Y |
| Lyndon B. Johnson | Democratic | 1963-1969 | 2 | Y | Y | Y |
| Richard Nixon | Republican | 1969-1974 | 2 | Y | Y | Y |
| Gerald Ford | Republican | 1974-1977 | 1 | Y | Y | N |
| Jimmy Carter | Democratic | 1977-1981 | 1 | Y | Y | N |
| Ronald Reagan | Republican | 1981-1989 | 2 | Y | Y | Y |
| George H.W. Bush | Republican | 1989-1993 | 1 | Y | Y | N |
| Bill Clinton | Democratic | 1993-2001 | 2 | Y | Y | Y |
| George W. Bush | Republican | 2001-2009 | 2 | Y | Y | Y |
So, of the 38 elections above, the incumbent president did not run in 4. In the remaining 34, the president lost re-nomination in 5, this shows the instability of the early parties. However, in 10 races, the incumbent president ran, won the nomination, and lost the election - this seems a high number. This means that the incumbent president lost in 10 out of 29 election where they ran and won nomination (34%). If we include nomination failures, the president ran in 34 elections and lost 15 times - or 44% of the time.
However, this doesn't truly reflect the upcoming election. First, Obama has been elected president at least once, unlike Ford. Further, he won while the presidency was held by the opposite party. Let's see if we can filter these down a bit.
| Name | Party | Years | Terms | Ran | Nominated | Won |
| George Washington | None | 1789-1797 | 2 | Y | Y | Y |
| John Adams | Federalist | 1797-1801 | 1 | Y | Y | N |
| Thomas Jefferson | Democratic-Republican | 1801-1809 | 2 | Y | Y | Y |
| John Quincy Adams | National Republican | 1825-1829 | 1 | Y | Y | N |
| Andrew Jackson | Democratic | 1829-1837 | 2 | Y | Y | Y |
| James K. Polk | Democratic | 1845-1849 | 1 | N | - | - |
| Millard Fillmore | Whig | 1850-1853 | 1 | Y | N | - |
| Franklin Pierce | Democratic | 1853-1857 | 1 | Y | N | - |
| Abraham Lincoln | Republican | 1861-1865 | 2 | Y | Y | Y |
| Grover Cleveland | Democratic | 1885-1889 | 1 | Y | Y | N |
| Benjamin Harrison | Republican | 1889-1893 | 1 | Y | Y | N |
| Grover Cleveland | Democratic | 1893-1897 | 1 | N | - | - |
| William McKinley | Republican | 1897-1901 | 2 | Y | Y | Y |
| Woodrow Wilson | Democratic | 1913-1921 | 2 | Y | Y | Y |
| Calvin Coolidge | Republican | 1923-1929 | 2 | Y | Y | Y |
| Franklin Delano Roosevelt | Democratic | 1933-1945 | 3 | Y | Y | Y |
| Dwight D. Eisenhower | Republican | 1953-1961 | 2 | Y | Y | Y |
| Richard Nixon | Republican | 1969-1974 | 2 | Y | Y | Y |
| Jimmy Carter | Democratic | 1977-1981 | 1 | Y | Y | N |
| Ronald Reagan | Republican | 1981-1989 | 2 | Y | Y | Y |
| Bill Clinton | Democratic | 1993-2001 | 2 | Y | Y | Y |
| George W. Bush | Republican | 2001-2009 | 2 | Y | Y | Y |
To be clear: this table only includes presidents who ran in and won the previous election - and their party did not did not hold the White House in that election. John Adams may not belong on this list, as the house was not previously held by an opposing party (or any party at all). There are 22 elections listed here, in 2 of them the incumbent did not run, and in 4 he did not win nomination. This means an electorally-successful incumbent president ran and won the nomination of his party 16 times, and lost the general election 5 of those times. This failure rate is almost the same as above, 31%. If we include failures to get nomination, then the number is 9/20, or a whopping 45% (again, almost the same as above). However, the last time a sitting president ran for but lost nomination was Chester A. Arthur in 1884, and the last politically successful sitting president to lose nomination was Franklin Pierce in 1857 - it's unlikely that Obama will lose the Democratic nomination.
A few other statistics for the period since 1945:
Elections in the first table: 10 Ran, Lost nomination: 0 (0%) Nominated, lost election: 3 (30%)
Elections in the second table: 6 Ran, Lost nomination: 0 (0%) Nominated, lost election: 1 (17%)
It's also interesting to note that historically, a sitting president running for election has a about a 55% chance of winning, or 5% higher than if two non-incumbents are running.