Since the latter half of the 20th century, Pennsylvania has been a powerful swing state. It supported the losing candidate in a presidential election only twice between 1932 to 1988, faltering in 1932 and 1968 with Herbert Hoover and Hubert Humphrey, respectively. Between 1992 and 2016, Pennsylvania trended Democratic in presidential elections, voting for Bill Clinton twice by large margins, and by a slightly closer margin for Al Gore in 2000. In the 2004 presidential election, Senator John F. Kerry beat President George W. Bush in Pennsylvania, 2,938,095 (50%) to 2,793,847 (48%). In the 2008 presidential election, Democrat Barack Obama defeated Republican John McCain in Pennsylvania, 3,184,778 (54%) to 2,584,088 (44%). By the 2016 presidential election, Republican Donald Trump broke the Democratic streak of the state, winning by 2,970,733 (48%) votes to 2,926,441 (47%) votes. The state returned to the Democratic column in 2020 by narrowly voting for Joe Biden over Trump, 3,458,229 (50%) to 3,377,674 (48%). The state holds 20 electoral votes.