The ‘Missing Digit’ Calculator Trick

By Matt Baker - Wednesday, December 9, 2020

The following is a demonstration that I’ve been doing for decades. It used to be a bit impractical, because it requires having a calculator on hand. But nowadays just about everyone has a calculator on hand at all times on their cell phone. And while it might not be the most spectacular effect that I know, it’s actually quite deceptive and can be done completely impromptu. It’s an especially practical trick at the moment, because it also works perfectly over Zoom.

old-fashioned calculator

Here’s the effect as I perform it. I claim no originality here, but I don’t know to whom proper credit belongs (see below for my best attempt at crediting)- it’s an old trick with numerous variations.


The magician asks a spectator to take out her cell phone. She is asked to open up the calculator and type in a single digit from 1 to 9. The magician doesn’t look while this is happening. Then the spectator is asked to hit “times” (multiplication key) and type in another random digit from 1 to 9. This is repeated around 10 times in all, at which point the spectator hits “equals”. She is now looking at a completely random number having around 8 digits. The magician asks the spectator to mentally ‘circle’ one of the digits in her number and concentrate on that digit. “You’re not thinking of a zero, are you?”, the magician asks. The spectator shakes her head no. “Good… that one doesn’t work very well because it has no value.

The magician continues, “I’d like you to read aloud all of the digits in the random number you’re looking at except for the one you mentally circled — just skip that one. You can recite the digits from left to right or right to left, as you wish, but when you get to your mentally chosen digit, just skip over it and continue reading with the next one.” After the spectator has called out all of the digits except for the mentally selected one, the magician looks at her and says, “Concentrate on your mentally chosen number one more time. And start counting out loud, slowly, from 1 to 9…” When she gets to 7 (say), the magician calls out “Stop! That was it, wasn’t it — you were thinking of a 7!” The spectator confirms that she was.

The effect can be repeated again, if desired, by multiplying the random number showing on the calculator by some additional random digits and then going through the same procedure.


There are actually two different principles at work here, and it’s the combination that I really love. The first is the following:

Principle #1: With very high probability, the random number that the spectator ends up with after all the multiplications will be a multiple of 9.

Indeed, all the spectator needs to do is either type in the number 9 once, or some combination of 3s and 6s twice, and she will automatically end up with a multiple of 9. Using this observation, it can be shown that there’s about a 92.5% chance that the spectator will end up with a multiple of 9. (More on this calculation at the end…) In other words, the trick will fail less than 8% of the time. To me, that’s an acceptable risk, but it depends upon the situation, of course — I probably wouldn’t do this on live television without having a backup plan in mind!

The second idea at work here is:

Principle #2: If you add together the digits in any multiple of 9, the result will also be a multiple of 9.

For example, 72 is a multiple of 9 and 7 + 2 = 9. As another example, 756 is a multiple of 9 and 7 + 5 + 6 = 18. Note that this process can be repeated with 18, the answer we got from doing the previous calculation: 1 + 8 = 9. Adding together the digits of a number, then adding together the digits of the result, and so on, repeating until we end up with a single digit is called casting out 9s. It has a wealth of applications in real life, for example to error detection and correction through the concept of a check digit.

What does this have to do with our trick, though? Well, take a look at the previous example of 756. Suppose we mentally circle the 7 and then read out the other two digits (5 and 6). Now 5 + 6 = 11 and 1 + 1 = 2, so by casting out 9s we obtain the number 2. We know, however, that had the thought-of digit been included, we would have gotten a final answer of 9. So the missing digit must have been a 7. (In algebra terms, if the missing digit is X, then X + 2 = 9 and therefore X = 7.)

For a larger, more realistic example, suppose the spectator reads the following digits out loud: 1, 1, 6, 2, 1, 6, 0. Let’s figure out the missing digit by casting out 9s: 1 + 1 + 6 + 2 + 1 + 6 + 0 = 17 and 1 + 7 = 8, so the missing digit should be a 1.

In general it’s faster (once you practice a bit) to keep a running total in your head as the digits are read aloud and cast out 9s as you go along. In the previous example, we would perform the following mental calculations: 1 + 1 equals 2, 2 plus 6 equals 8, 8 plus 2 equals 10. We now replace 10 by the sum of its digits 1 + 0 = 1, so our “running total” is now 1 rather than 10. Continuing: 1 (our current running total) + 1 = 2, 2 plus 6 equals 8, 8 plus 0 is still 8. Our final result is 8, and therefore (as before) the missing digit must be a 1.

To test your understanding, see if you can work out the missing digit supposing the spectator reads the following out loud: 1, 4, 5, 1, 2, 0.

(Don’t read any further until you’ve done the exercise!)

Finished? Hopefully you got the correct answer, which is 5. Indeed, 1 + 4 + 5 = 10, which simplifies to 1 + 0 = 1. And then 1 (our current running total) + 1 + 2 + 0 = 4. In order to reach a total of 9, the missing digit must therefore have been a 5.

By the way, if you cast out 9s and get an answer of 9, the spectator’s thought-of number will also be 9 (assuming you’ve ruled out zero, as in the script above; otherwise there will be an ambiguity — see below for more information).


I’ve tried but mostly failed to track down the history of this trick. (Feel free to leave comments below if you have any credits to add.) The Conjuring Archive lists Sam Loyd (who I also mentioned in this post) as one of the early utilizers of this principle, and a similar trick to the one above appears in Harry Lorayne’s “The Magic Book”. However, in Lorayne’s version, like in many other versions I’ve seen, the procedure is ‘deterministic’ (Principle #1 is not used). I’d love to know who first had the idea to combine Principles 1 and 2.

In Asi Wind’s recent Vanishing Inc. Masterclass (Part 3, starting at around 33:30), Asi performs and teaches his own version of this trick. Like in Harry Lorayne’s version, Asi’s procedure is ‘deterministic’: he (Asi) chooses the number 27 and has the spectator choose another 2-digit number, and then the spectator multiplies these two numbers together. But Asi adds a number of interesting presentational and psychological touches to the effect, and if you’re interested in performing this trick I recommend you check out Asi’s work on it.

A Note about Zero

The script above for how to handle what happens if the spectator thinks of the number zero was borrowed from Asi Wind’s version. Another idea I’ve used in the past (not original, but I don’t know whom to credit for this) is the following. Suppose you cast out 9s and get an answer of 9. If you haven’t yet ruled out zero, then the thought-of digit could be 0 or 9. How to determine which is which? Well, there are many fishing techniques which can be used here, but a rather cunning one is to ask the spectator to concentrate on her number and then say, “For some reason I’m getting nothing.” If she reacts to this, it means she’s thinking of zero. Otherwise, ask her to concentrate harder and then guess that she’s thinking of a 9. Usually she will say yes, but if not you can then say, “No, wait… it’s a zero! That’s why I was getting nothing before!

Casting out 9s: Why does it work? (Explanation of Principle #2)

The explanation for why Principle #2 works is actually not so complicated. Recall what the principle says: If you add together the digits in any multiple of 9, the result will also be a multiple of 9. But why? I’ll first explain why it works in the case of three-digit numbers, just to fix ideas. A three-digit number N such as 648 is equal to 6 x 100 + 4 x 10 + 8 (that’s what base 10 means, after all). More generally, if N is written in base 10 as ABC, this means that N = 100 x A + 10 x B + C. The difference between N and the sum a + b + c of its digits is therefore (100 x a + 10 x b + c) - (a+b+c) = 99 x a + 9 x b, which is visibly a multiple of 9. It follows that N is a multiple of 9 if and only if the sum of its digits is (and in fact, these two quantities leave the same remainder when divided by 9).

The same reasoning applies to any number of digits, since a power of 10 minus 1 is always a multiple of 9. In fact, 10k - 1 = 999…99, with the digit 9 repeated k times, which is equal to 9 times 111….11.

[GeekFest alert] Where did that 92.5% come from? (Explanation of Principle #1)

Finally, for those of who are interested in this sort of thing, let me quickly explain how to find the probability of getting a multiple of 9 when you multiply together randomly chosen non-zero digits ten times in a row. (Less mathematically inclined readers may wish to simply declare victory now and stop reading at this point.)

First of all, the total number of combinations possible (in other words, the number of ways to select a non-zero digit ten times in a row) is 9 x 9 x 9 x … x 9 (10 times) = 910 = 3486784401, because there are 9 choices (1 through 9) for each digit and you’re choosing 10 digits altogether. We'd like to figure out how many of these choices lead to a multiple of 9 when we multiply all the digits together.

To do this, it’s easier to figure out how many choices do NOT lead to a multiple of 9. There are two ways this can happen. One is that we NEVER choose a 3, 6, or 9. The number of combinations where this occurs is 610, since there are six non-zero digits other than 3, 6, or 9.

The other possibility is that we never choose a 9, and we choose either a 3 or a 6 exactly once. The number of combinations where this happens with a 3 or 6 as the FIRST number called out is 2 x 69, since there are two choices (6 or 9) for the first number and then 6 choices (anything other than 3, 6, or 9) for the remaining nine. But we need to multiply this result by 10, since there are 10 different possibilities for when the lone 3 or 6 gets called out. So the number of combinations with exactly one 3 or 6, and no 9s, is 10 x 2 x 69.

It follows that the total number of choices which do NOT lead to a multiple of 9 is 610 + 10 x 2 x 69 = 262020096. Thus the total number of choices which DO lead to a multiple of 9 is 3486784401 - 262020096 = 3224764305, and the probability in question is therefore 3224764305 / 3486784401 = 0.92485…

(See, I told you you’d be better off just declaring victory before reading this last section.)

Reader comments:


Thursday, 10 December 2020 20:25 PM - Reply to this comment

I love this and will definitely be using it! Thanks


Friday, 11 December 2020 01:41 AM - Reply to this comment

My mind is blown! I've always loved the rule of 9's but this makes for an interesting effect. Thanks for sharing!


Friday, 11 December 2020 13:46 PM - Reply to this comment

Another awesome post. Thanks Matt!


Friday, 11 December 2020 17:47 PM - Reply to this comment

This is one of my favorite tricks.

Mark Elsdon has a great utilization of this trick.

I do this, then after I know their number I say "I can't pick this up... Can you think of this as a word" then I get into BrainPlay by Bazz then the Inception Principle by H. Arcana.

It starts as a math trick, but then delves into something much deeper that gets the Spectator to get away from their calculator, when from the very beginning, the calculator was the key to getting into their mind ??

This is one of my favorite feats in a (mostly) propless piece of Conversational Mentalism.


Friday, 11 December 2020 18:10 PM - Reply to this comment

Glad you enjoyed the post, @Richard, @Mark, and @montana!


Friday, 11 December 2020 18:12 PM - Reply to this comment

Marc Carrion asked via social media about using more than 10 random digits to increase the odds even further in the magician's favor. I should have mentioned that with 11 random digits the probability of success increases to 92.5% to 94.6%, and with 12 digits it goes up to 96.1%.

Marc also points out that if you have a group of three or four audience participants, you could get each one to multiply four random digits together in order to get to 12 total multiplications in a more organic way. With 16 digits (four spectators each multiplying together 4 random digits), the probability of failure is less than 1%.


Friday, 11 December 2020 18:23 PM - Reply to this comment

Derrick Chung wrote to me with the following additional crediting:

The Missing Digits trick appears in the book "Mathemagics: How to Look Like a Genius Without Really Trying" by Arthur Benjamin and Michael Shermer.

According to Derrick, both the "thinking of nothing" ploy and the probabilistic component where the spectator multiplies together lots of one-digit numbers appear in there. I don't have a copy of the book, but it's possible I learned this directly from Art Benjamin a long time ago.

In any case, as I write in the post, the basic principles at work here go back much further than the Benjamin-Shermer book. But it's good to have this reference here.


Tuesday, 15 December 2020 22:02 PM - Reply to this comment

I performed this trick over text message tonight. I never thought I’d do a trick over text but seemed to work well. Not as effective as in person as the lack of pace makes it trickier but it was a fun claim to offer to perform a trick over text.


Thursday, 17 December 2020 17:49 PM - Reply to this comment

@Elliott - nice! I hadn't thought of that possibility. Cool idea-


Tuesday, 21 February 2023 22:19 PM

I’ve now done it over text so much that I have it saved as a “script” on my phone now.


Thursday, 17 December 2020 17:53 PM - Reply to this comment

Per Strandberg from Sweden emailed me a great idea for this trick. Instead of having the spectator mentally select a digit and then omit it, Per gives the following instructions: "Now I want you to change one digit in the answer to 0. Then read to me, slowly, the modified result."

As you can’t change a zero to a zero, the 0 vs. 9 ambiguity is taken care of automatically with this approach! And zero doesn't add anything to the mental count, so from a mathematical point of view this is equivalent to just omitting that digit. Very smart!

Leave a comment

Log in or sign up to post a comment about The ‘Missing Digit’ Calculator Trick.

Back to blog homepage

Similar posts on the blog:

Feel The Glove

Feel The Glove

Matt Baker - Tuesday, May 11, 2021

Category: Mathemagical Themas

Read more

What Day Is It?

What Day Is It?

Matt Baker - Wednesday, March 10, 2021

Category: Mathemagical Themas

Read more



Matt Baker - Wednesday, February 10, 2021

Category: Mathemagical Themas

Read more