Two states Obama won last time _ North Carolina and Indiana _ went to Romney.
Romney won 23 states in all, largely dependably Republican states across the South and into Texas and the Great Plains. Obama held a 46,000-vote lead in Florida early Wednesday.
Turnout was reported heavy. Experts still expected it to remain below 2008 levels, finding voters less engaged. About 32 million people had voted early, either in person or by mail.
Obamas vote total early Wednesday stood at 50 percent to Romneys 48 percent, with 97 percent of precincts reporting.
Romney, who is 65 and has pursued the presidency twice without success, made no announcement of his immediate plans, but his wife, Ann, earlier indicated that this campaign would be his last.
Obama took office in January 2009 with a mandate to revive an economy still struggling to recover from the Great Recession of 2007-2009, the worst downturn since the Great Depression. Six of 10 voters Tuesday said the economy was the most important issue, well ahead of health care or foreign policy. Three of four voters said the economy remained poor or not so good.
Obama touted the economys steady progress on his watch. Romney cited stubbornly high unemployment and mounting federal debt as he argued the recoverys pace was too slow. In exit polls, slightly more than half said Obama was more in touch with people like them, compared with 44 percent for Romney.
Obama was dogged throughout the year by voters expressing qualms about his stewardship of the economy. He was unlikely to match the nearly 53 percent share of the popular vote he got in 2008, or match the 365 electoral votes he won that year.
Obama was vulnerable from the beginning. Within weeks of taking office he pushed through an $831 billion economic stimulus plan aimed at easing the recessions impact. In 2010, he won approval of a historic overhaul of the nations health system, which will require nearly everyone to obtain coverage by 2014.
Both measures were passed with virtually no Republican support and often bitter partisan wrangling. Republicans saw a huge political opening, and fueled by the grassroots tea party movement, the party won control of Congress in 2010 by protesting what it called Obamas over reliance on and expansion of government.
At the same time, the economy struggled to recover. The nations unemployment rate, 7.8 percent the month Obama took office, went to 10 percent that October and was 7.9 percent last month more ammunition for the Republicans.
Obama, though, got some breaks. The economy did recover. Unemployment has dropped from its highs. Consumer confidence inched up. And Romney struggled at first to win the hearts of the conservative base of the Republican Party.
Obama exploited Romneys past, recalling his support of Massachusetts abortion rights laws and his support for the states health care law, considered a model for the federal program.
Romney won the nomination only after an unexpected struggle against a weak field, and not until the summer and fall did the party base begin rallying around him. The choice of Wisconsin Rep. Paul Ryan, a rising young party leader, helped energize the right, but Romneys biggest boost came during the Oct. 3 debate in Denver.
Romneys assured performance that night galvanized conservative support and seemed to give him new momentum. He briefly opened up a larger lead over Obama, only to see it fade as the president came back and did well in the next two debates.