The Mega Millions jackpot is at a whopping \$640 million, and lottery players have a one in 176 million chance of picking the winning numbers. Wonkblog’s Brad Plumer reports:

The country is in the throes of lottery fever, with millions of people in multiple states buying up tickets for a chance at winning the Mega Millions jackpot Friday night, now at \$540 million. But are they suckers? Or is the lottery actually a good deal?

It’s not totally absurd to ask. In theory, since a ticket costs only \$1 and your odds of picking the winning numbers are 1 in 176 million, the lottery should be a reasonable bet when the jackpot climbs past \$176 million. But Ben Casselman points to an analysis by computer scientist Jeremy Elson that lays out some complicating factors. You have to factor in taxes, plus the fact that you get a smaller amount if you ask for an upfront lump sum, plus the risk that you may have to split the winnings with someone else. When the jackpot gets this obscenely large, everyone and their aunt wants to play.

“Unfortunately for those of you hoping to buy a sports team,” concludes Elson, “this means the expected value of a \$1 ticket is only 63.2 cents (or a bit more or less, depending on your state).” So Friday night’s lotto isn’t such a good deal after all. Unless, like Felix Salmon, you find the act of playing the lottery itself a pleasant experience.

Of course, another strategy would simply be to buy up every single ticket combination. That would cost \$176 million. But you’d be guaranteed to win about \$293 million after taxes. Good deal, right? But there’s one big hitch: “First, if it takes five seconds to fill out each card, you’d need almost 28 years just to mark the bubbles on the game tickets. You’d also use up the national supply of special lottery paper and lottery-machine printing ink well before all your tickets could be printed out.” (Also, if just one other person picked the winning number, you’d end up losing \$30 million all told.)

Alternatively, you could try to hack the lottery, as these people did. This can be done even for completely random drawings. The numbers on the tickets for the Massachusetts Cash WinFall, for instance, are totally random. But, as the Boston Globe discovered, Marjorie and Gerald Selbee appear to have discovered a different loophole in the game. If no one wins the lottery’s big \$2 million prize, then, after a few weeks, payouts for smaller prizes start rising automatically. And, at that point, anyone who buys gobs and gobs of tickets — at least \$100,000 worth — is assured a profit. Perhaps there’s a similar pattern with Mega Millions.

Despite the long odds of winning the historic jackpot, lotto hopefuls are still lining up, reports The Associated Press:

Lottery ticket lines swelled Friday as the record Mega Millions jackpot grew to \$640 million, thanks to players who cast aside concerns about long odds and opened their wallets for a shot at what could be the biggest single lotto payout in the world.

A café worker in Arizona reported selling \$2,600 worth of tickets to one buyer, while a retired soldier in Wisconsin doubled his regular weekly ticket spending to \$55. But each would have to put down millions more to guarantee a win.

“I feel like a fool throwing that kind of money away,” said Jesse Carter, whose two tickets purchased Friday in Milwaukee, brought him to \$55 in total spending on the drawing this week. “But it’s a chance you take in life, with anything you do.”

The jackpot, if taken as a \$462 million lump sum and after federal tax withholding, works out to about \$347 million. With the jackpot odds at 1 in 176 million, it would cost \$176 million to buy up every combination. Under that scenario, the strategy would win \$171 million less if your state also withholds taxes.

Laura Horsley, who does communications and marketing for a trade association, bought \$20 worth of Quick Pick tickets at a downtown Washington, D.C., liquor store Friday. But Horsley, who said she won’t buy a lottery ticket unless the jackpot tops \$100 million, said she remained realistic.

“I don’t actually think I’m going to win, and I don’t believe in superstitions or numbers or anything like that,” she said. “I just figured it’s right around the corner. I’d be crazy not at least to give it a shot.”

Thousands of players — who converged on convenience stores in 42 states and Washington, D.C., where Mega Millions tickets are sold — agreed.

So, do lotteries really benefit public schools? The Post’s Valerie Strauss:

If you look at the payouts from lotteries to schools, you might be impressed by the numbers. In California, for example, all lottery donations to public schools from kindergarten through college, total \$24,018,713,472 since 1985. Yes, that’s \$24 billion. K-12 schools alone have received a total of \$19.3 billion.

It makes you wonder how some California public schools have had to hold bake sales to keep the lights on, doesn’t it?

In fact, in state after state, where lotteries send millions of dollars to public education, schools are still starved. Why?

Because instead of using the money as additional funding, legislatures have used the lottery money to pay for the education budget and spent the money that would have been used had there been no lottery cash on other things. Public school budgets, as a result, haven’t gotten a boost because of the lottery funding.

In Virginia, lottery tickets have a tag­line that says “Helping Virginia’s Public Schools” and more than \$5 billion in lottery proceeds have gone to public education in the last 24 years, about \$450 million annually.

But, according to the Virginian-Pilot, the money is used by state lawmakers to cover education expenses rather than extra money. And when it is time to cut budgets, education doesn’t get spared.

“That’s been a slow and insidious movement that’s been going on for a few years now,” Kitty Boitnott, president of the Virginia Education Association, was quoted in the Virginian-Pilot, as saying. “It’s a big ruse, and I don’t believe Virginians, in general, are aware of it.”

In Maryland, more than \$519 million of lottery proceeds was contributed to the state in 2011, and that was used for programs including education, public health, public safety and the environment, according to the Maryland Lottery Web site. The lottery has given more than \$12 billion to the state since 1973. Yet, still, the state government is considering raising taxes in order to keep the state’s highly regarded public education system funded at record levels.

In Washington D.C., the lottery since 1982 has contributed more than \$1.6 billion to the city’s general fund for programs including schools, recreation and parks, public safety, housing, and senior and child services. Still the city can’t meet its education needs: The mayor, Vincent C. Gray, has proposed a spending plan for next year that provides a 2 percent raise in the student funding formula, my colleague Bill Turque reported. But basic costs have risen closer to 5 percent.

In Texas, where the lottery was sold to the public, as in other places, as a fun game that would reap big rewards for public education. According to the American-Statesman, in 1996, “lottery proceeds paid for about two weeks of schooling for Texas students.” By 2010, the money covered barely three days.

More from The Washington Post: