The three winners of the Mega Millions lottery game will become fabulously wealthy upon claiming their prize. But also among the winners are state governments.

On Friday, three contestants who bought tickets in Illinois, Maryland and Kansas matched the winning numbers for the 43-state Mega Millions lottery prize drawing featuring a $656 million jackpot. Split three ways, that's $218.7 million a piece, or $158 million each if they each take the lump-sum cash option.

States typically measure the revenue impact of lotteries based on the money they generate from ticket sales. A portion of lottery ticket sales goes to the winners’ pool, but much of it goes to various state funds, especially for education. A jackpot that has lots of people buzzing -- and rushing to buy tickets -- helps the state generate more revenue.

But, in the case of the Mega Millions game, the jackpot itself was so large that the taxes it will generated will become a windfall.

In Kansas, for example, lottery games generated $70.7 million for the state in the 2011 fiscal year. Last week's winning ticket alone (assuming that one ticketholder lives in Kansas) will generate an estimated $7.9 million for the state, based on a 5 percent state tax on the lump-sum winnings.  Illinois, where another winning ticket was sold, also has a 5 percent tax.

In Maryland, lottery state and local taxes on lottery winnings come out to about 8.5 percent, according to lottery officials, or about $13.4 million in the case of a Mega Millions winner (assuming he or she lives in Maryland).

That’s a drop in the bucket compared to the $1 billion shortfall Maryland is trying to close as the 2013 fiscal year approaches. But in the context of a single department, it’s significant. The state and local tax revenue on the Mega Millions winnings, for example, exceeds the operating budget of governor and lieutenant governor’s offices.

“It’s a win for everybody,” says Carole Everett, a spokeswoman for the Maryland Lottery.

Baltimore County, where the ticket was sold, could be entitled to 2.83 percent in income taxes on the winning ticket, or about $4.47 million -- assuming that the winner lives in Baltimore County. That’s more than the budget of the county's circuit court.

The revenue impact of potentially being home to a winner "didn’t dawn on all of us until the winning became apparent,” said David Treasure, executive director of Maryland’s Office of Budget Analysis.

 "[Y]ou certainly get to see there’s an … impact for states lucky enough to get a winner,” Treasure said.

In the case of Mega Millions, the tax revenue is especially significant because it comes from outside the state. Unlike a typical lottery, where contestants are generally limited to residents of a single state, Mega Millions is played nationwide. That means the state tax revenue generated by a winning ticket primarily comes from the pocketbooks of people who live elsewhere.

Because the lottery jackpot was split among three winners, the revenue may not be as large as it might have been had there been a single winning ticket.

Most states tax lottery winnings at about 5 to 8 percent. At a 5 percent state tax rate, a lump-sum prize sold to a single Mega Millions winner would have generated almost $24 million.

The Associated Press reported last week that the taxes on a Mega Millions victor in Rhode Island would have been nearly enough to fund an upcoming state affordable housing bond, or it could have been used to reach the state's goal for the amount of aid it provides school districts.

Last year, a group of coworkers in New York won the largest Mega Millions jackpot on a single ticket, at $319 million.

With a lump-sum payout of about $202.8 million and a nearly 9 percent state tax on winnings in New York, that came to about $18 million of revenue for the state.