(WGHP) — They say the lottery is all about chance, but that’s not entirely true.

The Mega Millions jackpot has climbed all the way up to $830 million ahead of Tuesday’s drawing, the lottery’s third highest Mega Millions jackpot of all time. The biggest was a $1.586 billion win in 2016, and the second biggest was a $1.537 billion win in 2018.

While the winning numbers are chosen randomly and there’s no way to predict those winning numbers (unless you’re a time-traveler or a psychic), there are a few ways you could hypothetically guarantee a win.

When you buy a Mega Millions ticket, you get to choose five different numbers between 1 and 70. Then, you choose your Mega Ball, a number between 1 and 25. The full rules are available online.

Your cheapest guaranteed win

The easiest possible win in Mega Millions is matching only the Mega Ball, and guaranteeing that win is easy math. Buy 25 tickets and choose a different Mega Ball for each ticket.

At $2 a pop, you’ll spend $50 on your tickets. And what do you win? A whopping $2. You’ll get some meager bragging rights, but you’ll still be $48 in the red.

25 tickets

Prize: $2

But what about the Megaplier?

For an extra $1, you can add the Megaplier. There’s no guesswork involved in this bonus. By paying that extra buck, any winnings you get will be multiplied by the randomly-selected Megaplier. The odds say you’re most likely to see a x2 (1 in 3 chance) or x3 (1 in 2.5 chance) Megaplier. However, you could see a x4 (1 in 5) or x5 (1 in 15).

So let’s say you bought those 25 tickets for $50 and you splurged on the Megaplier on all 25 tickets. You’d be out $75 and guaranteed to win at least $4 because the lowest possible Megaplier would double your $2 prize. If the Megaplier was higher, you could increase your winnings to $6, $8 or $10 but we’re looking for a guaranteed win.

Your next cheapest guaranteed win

There’s no prize for just getting one of the white balls, but there is a prize for getting one white ball and the Mega Ball.

Because all five of the winning numbers will always be five different numbers between 1 and 70, you would just need to buy enough tickets to play every possible number once. So on your first ticket, you could play the numbers 1-2-3-4-5. On your second, play 6-7-8-9-10. On your third, 11-12-13-14-15, and so on. It would take you 14 tickets to play every possible number.

But remember that you still need the Mega Ball! You’d need to buy 14 tickets for each of the 25 possible Mega Ball results for a total of 350 tickets. Your guaranteed win would come with a $700 price tag. But how much would you win?

350 tickets

Prize: $20

You would definitely get something. Since you tried every number paired with every possible Mega Ball, you’re guaranteed to match each of the five white balls and the Mega Ball, but not necessarily on the same ticket. All you’d be guaranteed is $20 across five tickets each matching a different one of the five white balls and the Mega Ball.

If you splurged on the Megaplier, you’d pay $1,050, and you’d be guaranteed to win at least $40.

How to guarantee the jackpot

This is all chump change compared to the massive $830 million up for grabs in the Mega Millions jackpot. To win, you’d need to match all five white balls and the Mega Ball on one ticket.

Guaranteeing that jackpot win is simple but extraordinarily expensive. Just buy every possible combination.

To buy every possible combination of the five white balls, you’d need to buy 12,103,014 tickets for a total of $24,206,028. Thanks to that pesky Mega Ball, you’ll need to do that 25 times for each possible Mega Ball.

That means, to guarantee a jackpot win, you have to buy 302,575,350 tickets for a price of $605,150,700.

302,575,350 tickets

Prize: Jackpot

I know what you’re thinking: “$605 million? That’s it? If I do that, I could make a profit of more than $200 million!”

Not exactly.

According to the North Carolina Education Lottery, you’d need to subtract a 25% federal withholding and a 5.5% state withholding. And even then you have a choice to make: do you want that full jackpot paid to you over the course of 30 years or are you willing to take a smaller sum to have the cash now?

The annuity paid over 30 years loses $207,500,000 in federal taxes and $45,650,000 in state taxes. That $830 jackpot is whittled down to $576,850,000.

If you want your winnings immediately, you could opt for a $487,900,000 gross cash payment instead. The feds would take $121,975,000 and the state would take $26,834,500, leaving you with $339,090,500.

So if you’ve got the $605 million needed to buy over 300 million lottery tickets, you’d still only get about $576 million paid over 30 years or about $339 million cash.

And there’s one more potential slice that could be carved out of your prize: other winners. The jackpot is shared among all jackpot winners, so you might only get half of the jackpot or less.

So, yes, there are ways to guarantee a win, but you’re unlikely to win enough to make up for the cost of the tickets. There’s no gaming the system.

If you’re determined to try your luck, the next Mega Millions drawing is scheduled for 11 p.m. Tuesday. The deadline to buy tickets for the Tuesday drawing is 10:45 p.m. for retail locations and 10:43 p.m. for online play. Once a ticket is generated, it cannot be canceled. Once they’ve drawn the winning numbers, you can see the results on MyFOX8.com/lottery.