The first look at the 2012 FiveThirtyEight presidential forecast has Barack Obama as a very slight favorite to win re-election. But his advantage equates to only a two-point lead in the national popular vote, and the edge could easily swing to Mitt Romney on the basis of further bad economic news.

Mr. Obama remains slightly ahead of Mr. Romney in most national polls, and he has had a somewhat clearer advantage in polling conducted at the state level. Mr. Obama would be about 80 percent likely to win an election held today, according to the model.

However, the outlook for the Nov. 6 election is much less certain, with Mr. Obama having winning odds of just over 60 percent. The forecast currently calls for Mr. Obama to win roughly 290 electoral votes, but outcomes ranging everywhere from about 160 to 390 electoral votes are plausible, given the long lead time until the election and the amount of news that could occur between now and then. Both polls and economic indicators are a pretty rough guide five months before an election.

The forecast works by running simulations of the Electoral College, which are designed to consider the uncertainty in the outcome at the national level and in individual states. It recognizes that voters in each state could be affected by universal factors — like a rising or falling economic tide — as well as by circumstances particular to each state. Furthermore, it considers the relationships between the states and the ways they might move in tandem with one another. Demographically similar states like Minnesota and Wisconsin, for instance, are more likely to move in the same direction than dissimilar ones like New Hampshire and New Mexico.

Although the model — which is distinct from the electoral map put together by The Times’s political desk — relies fairly heavily on polling, it also considers an index of national economic conditions. Right now, the polls and the economy are broadly in agreement with one another — both point toward an extremely tight race — although the economic risks to Mr. Obama are somewhat to the downside.

Still, while the economic indicators suggest that the economy is growing sluggishly — at a below-average pace of about 2 percent growth per year — it is not yet in recession and incumbent presidents often receive the benefit of the doubt from voters. A favorable precedent for Mr. Obama is George W. Bush, who narrowly won re-election in 2004 under similar circumstances.

One of the confusing aspects of this presidential race so far is that national polls have often shown a race that is nearly tied — or Mr. Romney sometimes leading — while Mr. Obama has more often had the lead in polls of crucial battleground states. Sites that project the presidential outcome based on the state polls have thus seemed to show a tangible advantage for Mr. Obama, while those that look at the trend in national polls seem to imply that the race is too close to call.

Any evaluation of the presidential race needs to reconcile this discrepancy. That America is highly divided along partisan lines does not negate the basic mathematical identity that the whole must equal the sum of the parts.

One hypothesis might be that Mr. Obama enjoys some sort of intrinsic edge in the Electoral College — and that, like Mr. Bush in 2000, he could win the Electoral College while losing the nationwide popular vote.

Our analysis suggests, however, that this is not necessarily the case. The model’s simulations estimate that there is only about a 2 percent chance that Mr. Obama will win Electoral College while losing the popular vote. Meanwhile, there is only about a 3 percent chance that Mr. Romney will do so.

Instead, the disparity between state and national polls probably stems from a more banal factor: it likely results from the different types of polling firms that are active in each of these domains.

The polling firms that have dominated the national polls are Gallup and Rasmussen Reports, each of which release national tracking numbers on a daily basis. These firms have had Republican-leaning “house effects” so far, meaning that they show more favorable results for Mr. Romney than the consensus of polls.

Meanwhile, some pollsters that are more active at the state level, like Public Policy Polling and Marist College, have had Democratic-leaning house effects, giving Mr. Obama better results than the consensus does.

When such disparities have arisen in past elections, it has not necessarily been the case that the national polls have provided for a superior prediction. Instead, a more accurate estimate of the national popular vote could sometimes be arrived at by aggregating state polls together. Still, the model assumes that the truth is somewhere in between: the national polls probably underestimate Mr. Obama’s standing slightly, while the state polls overestimate it some.

This is not to suggest, however, that Electoral College strategy will have no bearing on the race. If the national margin remains close, the campaigns will have some difficult decisions to make.

The model suggests that the campaigns might do best to concentrate their resources. As much as campaign operatives love to talk about how they are expanding the map, contemplating unusual parlays of states in which they reach 270 electoral votes, the election is very likely to come down to a mere handful of states. In many ways, the relative ordering of the states is more predictable than how the election as a whole will play out.

The term the model uses for these key states is tipping point states, meaning that they could tip the balance between winning and losing in an election that came down to the final vote.

Foremost among these tipping point states are Ohio and Virginia. In 2008, both states had a very slight Republican lean relative to the rest of the country. However, the economy is comparatively good in each state, and Mr. Obama’s polling has held up reasonably well in them, putting them almost exactly in balance. Mr. Obama is given just slightly over 50 percent odds of winning each one, just as he is given a very slight overall lead in our national projection. But if Mr. Obama’s national standing slips, he would probably lose his lead in those states as well.

In the next tier of states are Colorado, Iowa, Nevada and Pennsylvania. The first three of these states project to be almost as close as Ohio and Virginia, but they are somewhat less important than it because they contain fewer electoral votes.

Pennsylvania is the reverse case: it is more of a reach for Mr. Romney, but has 20 electoral votes and therefore offers him a huge reward. Even if Mr. Obama were to win states like Virginia and Colorado, it would be nearly impossible for him to win the Electoral College if he lost both Ohio and Pennsylvania along with Florida.

Taken by itself, however, Florida may be a less valuable prize than usual. Right now, the polls there show almost an exact tie. But the model views Florida as leaning toward Mr. Romney, for several reasons.

First, the polls showing a tie there were mostly conducted among registered voters rather than likely voters. Republicans typically improve their standing by a point or two when polling firms switch from registered voter to likely voter polls, probably because Republican voters are older, wealthier, and otherwise have demographic characteristics that make them more reliable bets to turn out. The model anticipates this pattern and adjusts for it, bolstering Mr. Romney’s standing by a point or two whenever it evaluates a registered-voter poll.

In addition, the fundamentals somewhat favor Mr. Romney in Florida. The state has been somewhat Republican-leaning in the past, and its economy is quite poor. Mr. Romney has raised more money than Mr. Obama there, and its demographics are not especially strong for Mr. Obama. The model considers these factors in addition to the polls in each state. In the case of Florida, they equate to Mr. Romney having about a 60 or 65 percent chance of winning it, and Mr. Obama probably has easier paths to 270 electoral votes.

Other states that are sometimes considered battlegrounds are even less likely to swing the national outcome. Mr. Obama has only about a 30 percent chance of carrying North Carolina again, according to the model. In the instances where he does, it will most likely come along for the ride only after Mr. Obama has already accumulated enough electoral votes elsewhere to win another term.

Likewise, although Republicans might be tempted to make a play for Wisconsin after winning the gubernatorial recall election there on Tuesday. The model suggests that it is over-hyped as a swing state. Mr. Obama has had a fairly consistent lead in the polls there, including in the exit poll among voters who turned out on Tuesday. Although Mr. Obama is unlikely to win Wisconsin by 14 points, as he did in 2008, all indications from the polls are that the state remains somewhat more favorable to him than the country as a whole, meaning that is not quite at the electoral tipping point and is more like Mr. Romney’s equivalent of North Carolina.

If there is an unheralded state that could be in play this year, it might be Oregon. Oregon has been sparsely polled, but the most recent survey found a tight race there, and the state has been extremely competitive in the past — like in 2000 when Al Gore won it by less than a full percentage point.

Still, all of this could be outweighed by a shift in economic circumstances.

The model creates an economic index by combining seven frequently updated economic indicators. These factors include the four major economic components that economists often use to date recessions: job growth (as measured by nonfarm payrolls), personal income, industrial production, and consumption. The fifth factor is inflation, as measured by changes in the Consumer Price Index. The sixth and seventh factors are more forward looking: the change in the S&P 500 stock market index, and the consensus forecast of gross domestic product growth over the next two economic quarters, as taken from the median of The Wall Street Journal’s monthly forecasting panel.

These variables were chosen because they provide for a broad consensus view of economic conditions, and because they are updated frequently, as opposed to other series, like gross domestic product, that are reported with long lag times.

It is essential to take a consensus of economic indicators because they often diverge — picking the wrong one could give you a misleading impression about the overall state of the economy and the election. For instance, industrial production has been quite strong, while personal income has been especially weak, and jobs growth has been all over the board in recent months. The consensus of indicators, however, points toward a decidedly below-average but not quite recessionary economy.

This economic index, which is scaled on a similar basis to gross domestic product and now reads at 2.2 percent, exerts a gravitational pull on the forecast. Right now, it suggests that the economy is in a state where the election “should” be very close. If Mr. Obama develops a large lead in the polls — without any underlying improvement in the economic fundamentals — it will therefore adjust his numbers downward. Likewise, if Mr. Romney were to build a clear lead in the polls, it would shave some of that advantage off, unless that came because of a deterioration in economic circumstances.

The model is designed such that this economic gravitational pull becomes less as the election draws nearer — until on Election Day itself, the forecast is based solely on the polls and no longer looks at economic factors. The track record of candidates who have polled strongly in June in defiance of the economic fundamentals is not so great, whereas if the same is true in September or October, it is much more plausible that the election will prove to be an exceptional case.

But the economy will exerts a fair amount of influence on the forecast for the time being. For instance, the poor jobs numbers that were released on Friday would have tangibly worsened Mr. Obama’s forecast, while the nearly 300-point stock market rally on Wednesday would have improved it.

In addition to running a forecast of the Nov. 6 outcome, the model also reports a “now-cast,” which looks at the same information, and runs the same code, but assumes that the election is held today instead of in November. There may be times at which different candidates lead the forecast and the now-cast. For instance, the model will adjust polls conducted just after the party conventions, which typically produce short-lived “bounces” that soon fall back to earth. A candidate in the midst of a convention bounce might lead the now-cast but trail in the Nov. 6 forecast.

Apart from adding the economic component of the model, and introducing the now-cast, most of the other details of the model are similar to the version we ran in 2008. However, we have tightened the model’s logic in some places, particularly in cases where ad hoc assumptions are replaced by more empirically driven guidance from our polling database.

For instance, we found that “fundamentals” factors at the state level — particularly how it voted in the past two presidential elections — should be given more weight relative to the polls there than we had been assigning them in 2008. This means that in cases where polling in a state is sparse, the fundamentals analysis will tend to dominate. For instance, the model does not give much credence to the idea that Tennessee is close, even though a poll or two have shown it that way, since the volume of polling is not very high and since the fundamentals break sharply against Mr. Obama there. However, once a state gets a number of recent and reliable polls, the model will mostly trust the polling and the fundamentals analysis will matter less.

As was the case in 2008, the model will adjust its forecast in each state even if there are no new polls there, based on the trend it discerns from polls in other states and at the national level. If, for instance, Mr. Obama goes through a period where his numbers have declined in Michigan and Pennsylvania, as well as in his national numbers, it would be naïve to conclude that this standing has not also deteriorated in Ohio, even if there are no fresh surveys there.

That said, one should be careful not overreact to new polls or other new information, particularly if they are unrelated to changes in fundamental circumstances of the race like economic conditions. One or two new polls are rarely the basis for a “trend,” and often even three, four or five new polls can be deceptive surprisingly often.

The model is fairly conservative about calculating the trend line at first, requiring a lot of evidence before it shifts the numbers much, but will become much more aggressive in the closing stages of the race. It also considers the fact that some states are inherently more sensitive to the national trend than others.

Any model is a simplification of the real world and requires making choices and assumptions. It therefore introduces the possibility of human error if the choices are the wrong ones. We would never suggest that you should look at our model alone at the expense of any other perspectives on the presidential race.

At the same time, we have thought about each of these choices and assumptions very carefully, and hope to explain them to you in much more detail in a series of posts over the rest of June. They are guided by an empirical outlook on past presidential races, including what we believe may be the world’s most comprehensive database of past presidential polls. The choices are also guided by an overall philosophy toward model-building, some of which comes from the investigations I have undertaken about forecasting as part of my upcoming book. In general, our model is fairly simple in the way it projects the national numbers, essentially just relying on two variables (“polls” and “economy”). It gets more detailed in the way it evaluates data at the state level, since the states provide for 50 data points in each past election rather than just one, allowing for more robust analysis.

The model will be updated several times a week at first, and then nearly every day once we reach the summer.