Lottery Prediction Algorithm Excel + Download Example

A Brazilian mathematician named Renato Gianella says that it’s possible to predict lottery numbers using probability theories and complicated math. Gianella wrote a study called The Geometry of Chance: Lotto Numbers Follow a Predicted Pattern. This study suggests that not all combinations of numbers have the same probability of showing in a draw.

Therefore, it’s possible to predict patterns or combinations of numbers that have a greater chance of showing up in a lottery draw. But what if you don’t know complicated mathematics? If you want an easier way to predict lottery numbers there’s a way you can use algorithms using Excel. I will show you how you can create your document so you can have a list of numbers that have a greater chance of appearing in a draw.

Algorithm to Predict Lottery Numbers Explained

An algorithm is a combination of instructions that help you solve a complicated task. Every computer uses algorithms to function. A lottery prediction algorithm uses a large combination of numbers to help you pick the correct set of numbers.

Explanation of the Algorithm to predict lottery numbers

You can use Excel to create your algorithm. All you have to do is enter the correct command on your Excel spreadsheet and it will analyze hundreds or thousands of numbers for you. This algorithm process gives you a list of predicted numbers that are most likely to show up in a draw.

The benefit of using Excel to create prediction algorithms is that you can use the method for any lottery in the world. So if you want to try your hand at the most popular online lotteries such as MegaMillions or US Powerball you can use your prediction algorithms to increase your chances of winning.

Other than MegaMillions or US Powerball, you can use prediction algorithms to increase your odds for our other best online lotteries by country.

Also, you should use the opportunity to get bonuses of up to 20% off, available when playing the world’s biggest lotteries with theLotter!

Once you ready; Play With the Best Lottery Sites!
4.5 rating
4.8 rating
4.3 rating

How to Create a Lottery Prediction Algorithm Formula Using Excel

Now that you know more about lottery prediction algorithms, I’d like to show you how you can do it yourself using Microsoft Excel. This program is a powerful tool and is ideal for people who can’t write codes or have no experience in programming. Furthermore, you don’t need extensive skills in Excel to create your own prediction algorithm. Follow these steps to get started.

Open Up Excel – Create Your Document

Open up a new workbook in Microsoft Excel. To make it easier for you to read you can add color-coded headings or highlight certain sections. But if you want to create a simple spreadsheet then you don’t need to add anything fancy.

Fill in Your First Column

Start by typing in 1 in the A1 cell and then 2 in the A2 cell. Take a look at the screenshot I’ve provided below to assist you.

Fill in Your First Column - I

As I mentioned before, you can use this algorithm for any lottery around the world. For this example, I’d like to use a lottery that has 70 balls in the main drum. Therefore you’ll need to number column A from 1 to 70.

You can enter these numbers manually but that will take time. So, highlight the first and second cell (A1-A2) and a green box will appear around the cells. There will be a small dot on the bottom right-hand corner of the box. Click on the small dot and then drag the green box all the way down to cell A70. this will enter numbers 1 to 70 in that column.

If you’re playing a different lottery such as US Powerball that has a drum of 69 balls then you’d enter numbers 1 to 69 in column A. Take a look at the screenshots I’ve provided below to assist you.

Fill in Your First Column - II
Fill in Your First Column - III

Enter Your Function in the B Column

Now that your first row is filled, enter the following formula into cell B1:

=COUNTIF(U72:AO6000;A1). Double click on U72:AO6000 and press your F4 key to make the formula absolute. If you don’t have an F4 key you can use your digital keyboard. Make sure you copy this function all the way down to cell B70. You should have zeros filling up your B column.

Enter Your Function in the B Column

Highlight your range from B1 to B70. Now click on the Home button in the top left-hand corner of your screen and go to the Styles tab to select Conditional Formatting. Click on Top/Bottom Rules and then select Above Average. Select the text highlight you want. This function will highlight the numbers that are above average in your algorithm after the next step.

Enter Another Formula in Column U71

Find column U71 and enter the next formula:


Once you enter the formula a random number will appear between 1 and 70 which is the range in your lottery’s primary drum. When I entered the formula I got a number of 34. You may get a different number when you enter the formula. Now copy that cell by pressing Ctrl+C.

At the top of your A column, you’ll see a box with U71. In that block, you’ll want to type in the following formula: U72:AO6000

Now press Ctrl+V to paste this formula throughout the cells on your document. Just remember to use the Paste Values option.

You’ll see rows and rows of numbers!

Highlighted Numbers in the B Column

You’ll now see a list of numbers under the B column that is highlighted. The numbers that are highlighted in this column are those that appear above average. The excel sheet also counted how many times the number in column A appears in the workbook.

Repeat the process Using the Highlighted Numbers

The process above creates a spreadsheet with thousands of numbers that are randomized. From this sheet, you can select frequent numbers that appear so you can use them on your lottery ticket. However, you still have too many highlighted numbers.

Therefore, you’ll need to narrow the numbers down by repeating the process mentioned above four times. Open up a new Excel spreadsheet but keep your algorithms workbook that you created open. Instead of entering numbers from 1 to 70 in your A column, you’ll use the numbers that are highlighted in your previous workbook. You’ll have fewer numbers to work with now.

Simply copy the values from your previous workbook, enter them into column A and repeat the steps:

  • Enter the COUNTIF… formula in the B column
  • Go to U71 and type in =RANDBETWEEN(1;70)
  • Enter U72:AO6000 into your cell box above the A column
  • Copy the cell as before, and paste

If you still have too many highlighted numbers in column B then simply repeat the processes until you get the amount of numbers you need for your chosen lottery.

Determining Lottery Probability in Excel

Most lotteries have a one-in-a-million chance of winning. Some players choose lotteries that give them a better chance of winning, which are usually smaller lotteries such as Mexico’s Chispazo. This lottery has a probability of 1 in 98,280 chances of claiming the jackpot prize.

To find out what the probability of winning your favorite lottery is, simply open up a new excel spreadsheet and follow these easy steps:

  1. In column C1 type in your chosen lottery number range. For example, US Powerball has a range of 1 to 69. So type in 69 under column C.
  2. For Column D1 type in the quantity of numbers, you need to choose. For US Powerball you need to choose five numbers so type in the number 5 in your column.
  3. In the E1 cell type in this formula =COMBIN(C1, D1) and press enter. The formula will give the probability for your chosen lottery.

With these steps, you can make a decision if this is the best lottery for you to play based on your odds of winning.

Using Two-Drum Lotteries

Do you want to determine your odds of winning using a two-drum lottery? Then you can add certain information to your excel spreadsheet to get your answer. Follow these steps:

  1. In cell C1 type in your chosen lottery number range. If you’re playing MegaMillions type in 70 in this cell.
  2. You must choose five numbers in the main drum to win MegaMillions so in cell D1 type in 5.
  3. Use the formula = COMBIN(C1, D1) in cell E1 to determine your probability.
  4. Add your second drum number range in cell F1 which will be 25 if you’re playing MegaMillions.
  5. In cell G1, enter this formula =E1*F1 to give you the actual lottery odds if you were to choose 5 numbers plus your bonus number.

Use This Pre-Made Excel Lotto Algorithm Download

If you don’t want to create your spreadsheet every time you want to play the lottery then download this pre-made Excel spreadsheet I’ve made. The pre-made Excel sheet will save you time because you won’t have to enter all the formulas.

If you’re playing a different lottery to the one on the downloaded Excel spreadsheet simply change the numbers in your A Column and make sure your formulas correspond with the cells you’ve changed.

Final Thoughts about Lotto Prediction Algorithm

Using a prediction algorithm in Excel is the ideal strategy to use when choosing your numbers. So instead of picking random numbers to play your favorite lottery, you can use the algorithms Excel created to increase your odds.

Remember to repeat the process four times using the method in this article to narrow your numbers down. Every time you use this method your numbers will be different. So you can create multiple spreadsheets if you want to play more than one lottery or buy more than one lottery ticket.


Can Excel predict the winning lottery numbers?

No program can predict the exact winning lottery numbers because they can’t determine the future. Excel helps you create an algorithm to help you choose numbers that may show up in the lottery but it can’t predict the winning numbers.

Can you make lottery number combinations in Excel?

Yes, you can use Excel to create number combinations. You can use the =COMBIN formula to create combinations. For example, if you have a lottery with a number range of 1 to 52 and you have to choose 6 balls, use the formula =COMBIN(52,6)

Are there other tools you can use to generate lottery numbers in Excel?

Yes, there are other tools you can use in Excel. The most popular one is KuTools for Excel that will help you generate lottery numbers easily.

Can anyone use Excel to predict lottery numbers?

Yes, anyone can use Excel to get the lottery numbers they need to play their preferred game. All you need is a computer or laptop with Excel installed on it. There are many tutorials online that provide various formulas to use. All you have to do is follow the steps and you’ll get your lottery algorithms.

What happens if your Excel lottery formulas aren’t working?

Sometimes Excel won’t recognize the formulas you’re using. You may have to adjust some settings. Make sure your Excel has Automatic Sum turned on. Click on your cell and under the Numbers tab on your home ribbon make sure it’s set to General and not Text.

Does the Lottery Number Prediction Algorithm Really Work?

One factor to remember is that no lottery prediction algorithm can guarantee a jackpot win. But it does significantly increase your chances of winning even if you win smaller prizes from other tiers.

On the other hand, the lottery prediction algorithm works for a specific purpose and will work for what it’s intended to do. Its task is to provide you with a combination of numbers that has a higher probability of showing up in a draw instead of giving you random numbers. But again, it can’t guarantee a win.