Barack Obama won re-election with a similar coalition that carried him to the presidency in 2008: women, young voters, African Americans and Latinos.
But the popular vote was not as strongly in Mr Obama's favour this time, owing to declines in some key but shrinking parts of the electorate.
The female vote
Men and women split between the candidates: overall, 55% of women voted for Mr Obama, 44% for Mr Romney. For men, 52% voted for Mr Romney and 45% for Mr Obama.
In 2008, Mr Obama gained a higher percentage of the male vote (49%) and a similar percentage of the female vote (56%).
However, there was a division between married and unmarried women: 53% of married women voted for the Republican candidate, while Mr Obama won unmarried women two-to-one: 67% to 31%.
Overall, women make up more of the electorate - 53% - slightly more than their share of the US population.
The ethnic vote
Mr Obama overwhelmingly won the black vote with 93%, a sliver lower than four years ago. Latinos also voted strongly for the Democrat - 71% in total and probably made electoral differences in Colorado and Nevada. Latinos or Hispanics made up 10% of total voters in the US, up one percentage point from 2008.
Mr Obama lost some of the white voters that propelled him to a strong win in 2008, with 39% voting for a second Obama term in comparison to 43% in 2008. The white electorate, while still a majority, dropped to 72% of the country as a whole, down from 74% four years ago, and 77% eight years ago.
The youth vote
Young voters were a key part of Mr Obama's victory for a second time.
Sixty per cent of voters aged 18 to 29 years voted for Mr Obama, slightly down from his percentage four years ago of 66%.
But the percentage of voters in this age range increased slightly, to 19% of the electorate.
Voters aged 30 to 44 were fairly split, with a slight inclination to Mr Obama, 52% to 45%.
The largest percentage of the electorate in terms of age, 45 to 64, went to Mr Romney with 51%.
Lower-income voters went decisively for Mr Obama.
Of those making under $50,000 (£31,000), 60% voted for Mr Obama.
The president did not do badly with middle-income and richer voters either, gaining 46% and 44%, respectively in each category.
The three income categories are fairly split among the electorate, with the lower-income group representing 41% of the total vote.
The religious vote
Mr Romney gained 62% of the Protestant vote.
Catholics and other Christians were split among the two major candidates.
Those of no religion as well as Jewish voters gave Mr Obama a vote of confidence at 70%.
Mr Romney, who would have become the first Mormon president if he had won, also gained the large majority of Mormon voters: 78%.
Those who went to religious services at least once a week were more likely to vote for Mr Romney (59%).
However, 55% of those who said they attended such services "a few times a month" voted for Mr Obama.
Throughout the campaign, both candidates said it was all about the economy, and voters' decisions largely came down to who they thought was best on the issue.
Fifty-nine per cent of those polled said the economy was their foremost concern. Among those, a slight majority (51%) went for Mr Romney. So how does this match with an Obama win? Fifty-four per cent of voters who named unemployment as their top economic concern voted for Mr Obama.
The president also received many more votes from those concerned about healthcare and foreign policy, while deficit-minded voters strongly chose Mr Romney.
Romney's empathy gap
What matters most in Americans' minds when they vote? About three in 10 wanted a "vision for the future" and another three in 10 wanted a president who shared their values.
Those who wanted a vision for the future voted more for Mr Romney (54% to 45% for Mr Obama).
However, another two in 10 voters wanted a president who "cares about people like me".
They overwhelmingly voted for Mr Obama - 81% in total - a sign that Mr Romney suffered an empathy gap among some voters.
All numbers based on exit polling conducted by Edison Research across the United States on 6 November.