Winning the $540 million plus Mega Millions jackpot would make you an instant millionaire. Just don't expect to walk away with that much cash.
The Mega Millions prize is less than half January's record-setting $1.6 billion Powerball prize, but it's not chump change, either. Friday's potential prize is the seventh largest in U.S. lottery history, and the game's third largest, according to a release from the Multi-State Lottery Association.
Of course, would-be winners face slim odds: The lottery puts the chance of winning the jackpot at 1 in 258.9 million. There's also a good chance they'll have to share the prize .
But one of the biggest bites comes from taxes.
The first hit is even before taxes kick in. That estimated $540 million prize is only if the winner opts to take the winnings in 30 payments over 29 years. If you want the money now in one lump sum , the jackpot is $380 million, a cut of roughly 30 percent.
Next up is the federal tax bill. Lottery winnings are taxed as ordinary income.
"If they win the jackpot, they're going to be subject to the highest federal tax rate of 39.6 percent," Melissa Labant, director of tax advocacy for the American Institute of Certified Public Accountants, told CNBC earlier this year. "It's a lot more significant than folks expect."
Nor are there many workarounds to substantially cut that bill. "You're not the type of consumer the U.S. government is looking to give a tax break to," she said.
The federal government automatically withholds 25 percent of such large prizes if the winner is a citizen or resident with a Social Security number. For someone choosing the lump sum, that reduces take-home winnings by $95 million. Residents who don't have a Social Security number, or fail to provide one, will have 28 percent withheld and foreigners, 30 percent.
Winners will have to pony up the remaining 14.6 percent in federal taxes come tax time in April 2017. That's a bill of as much as another $55.5 million you don't want to forget about amid early splurges. (Of course, the final tax bill will vary based on other elements of your tax situation, including the potential for deductions like state taxes paid or additional income from interest and earnings on invested winnings.)
"You definitely need to be planning for cash-flow issues and setting aside that money," Labant said.
So after federal tax obligations, you'd be left with at least $229.5 million. Not bad!
Depending on where you live and where you bought the ticket, state and local income taxes further reduce the winnings.
"In New York City, you pay federal, state, county and city taxes," Susan Bradley, a certified financial planner, told CNBC earlier this year. Bradley is also the founder of the Sudden Money Institute in Palm Beach Gardens, Florida, which helps consumers make the most of such windfalls.
Tallied up, a state and local tax bill could shave as much as another 15 percent — $57 million — off the lump sum, she said. That reduces your net winnings to as little as $172.5 million. (State withholding rates on lottery prizes vary, so some of that may need to be planned for as another tax bill come due next April.)
The luckiest Mega Millions winner would be someone who is a resident of Florida, New Hampshire, South Dakota, Tennessee, Texas, Washington or Wyoming — those states participate in Mega Millions but do not have a personal income tax. California and Pennsylvania also exempt lottery winnings from state income tax if you bought the ticket in state, according to lottery information site USAMega.com.
Generosity could result in Mega Millions winners taking home even less. If you anticipate sharing the prize money, make that agreement before the numbers are drawn (as you would with an office pool ) and divide ownership of the ticket before claiming the prize, said Labant. Otherwise, the money is a gift rather than income for those recipients, she said — meaning you, the giver, will be the one paying all the income taxes as well as any gift taxes resulting from a substantial split.
Triggering the gift tax is easy to do with such a big prize. The IRS allows you to gift up to $14,000 per recipient each year, tax-free, with bigger gifts eating away at your lifetime exemption of $5.45 million. (Gifts to a spouse are unlimited.) Exceed that, and the gift tax is a flat 40 percent.
Giving to charity in the year of your win could help. Even if you immediately make a big donation, you'll still have to claim the full prize as income, Bradley said.
The IRS generally allows you to claim donations worth up to 50 percent of your adjusted gross income as a deduction, with excess carried over for up to five years. Taxpayers can also deduct gambling losses, up to the extent of their winnings that year, as a miscellaneous itemized deduction, Labant said.
"If you spent a lot buying lottery tickets, and you can document those purchases, you can deduct those losses," she said.
The best way to minimize your tax hit would be to sit down with a tax planner, financial advisor, lawyer and other experts after you win but before you claim the prize money publicly, to figure out a plan based on what you want to do with the money, Bradley said.
"People like the idea of winning, and they don't like the idea of paying the tax," she said. "My general feeling on that is, get a good accountant, pay all the tax and be done with it."
More From CNBC