For most people, it is probably easiest to understand the idea of this calculation with a simple example. Let us use an imaginary lottery. In this imaginary lottery, you pick a number between 1 and 5, and a number between 1 and 5 is also randomly chosen as the winner. A ticket costs $1, and if you pick the correct number, you win the jackpot, which is $10. With simple math, we can determine that for every dollar you invest in such a lottery, you actually have a return of 100% on your money in the long run. This is because in the long run, you will be correct 1 in every 5 times you play. Every 5 times you play, you pay a total of $5 and receive a total of $10 (you double your investment therefore a 100% return). Here is how you can determine if you have the odds to justify playing a lottery on your own.
First, you have to calculate your equity in the jackpot. To calculate this, simply multiply the jackpot by your odds of winning the jackpot. In this case, the odds of winning the jackpot are 1/5 and the jackpot is $10.
Next, we simply compare our equity in the pot to our bet (the price of purchasing one ticket). In this case, $1. If your equity is greater than your bet, it is a profitable bet.
Because of this, we can conclude that in the long run, for every $1 we put into this lottery, we will receive $2. The same formula also applies to major lotteries that have jackpots in the millions. What this calculation does not take into consideration is that pots are sometimes split, if there is more than one winning ticket. Also, despite it potentially being a profitable investment, it is highly unlikely that any individual will ever win a lottery jackpot, the math simply states that if you were to play an infinite number of lotteries with those odds, you would come out with a profit.