The lottery is a fixture in our society, with Americans spending upward of $100 billion a year on tickets. States promote lotteries as a way to raise revenue for the state. And they do provide that, certainly, but it isn’t clear how meaningful that is in broader state budgets and it does come with a trade-off.

Among other things, that trade-off includes people losing money on the games. The prizes that are advertised for lotteries tend to be far lower than the total amount paid in by ticket buyers. This is a key reason that governments guard lotteries so jealously.

It’s also why so many people fall into the trap of believing that certain numbers are luckier than others. Some numbers do appear more frequently than others, but that’s purely random chance. It has nothing to do with any special properties of the number itself. Trying to pick lucky numbers is the same as trying to choose any other combination of numbers, and all of those combinations have the same chances.

But the good news is that there are some ways to improve your odds of winning. Learn about combinatorial math and probability theory, avoid superstitions, and you’ll be well on your way to making an informed choice that will lead to a greater chance of success. That’s what the Lotterycodex calculator is all about, and it works because of the mathematical foundation it is built on. Learn how the law of large numbers applies to lotteries and you’ll have the power to calculate your odds of winning.