Mental math booster.

One of the books I’m reading on my Kindle is Secrets of Mental Math: The Mathemagician’s Guide to Lightning Calculation and Amazing Math Tricks by renowned mathemagician Arthur Benjamin. The techniques he uses to do his astonishing mental calculations are amazingly simple and need only a little practice before you too can do math without a calculator. He reveals his secrets in this very fun book.

The book does include exercises to help me practice what I learned but after finishing them I was hungry for more numbers to crunch, so I decided to see what I could create using Javascript. I came up with the following script that serves the purpose perfectly.

<p id=”num1″>0</p>
<p id=”num2″>0</p>
<p id=”ans1″>Sum:</p>
<p id=”ans2″>Difference:</p>

<button onclick=”myFunction()”>Get Numbers</button>
<button onclick=”myFunction2()”>Calculate</button>

function myFunction()
var x=Math.floor(Math.random()*999);
var y=Math.floor(Math.random()*999);
document.getElementById(“ans1”).innerHTML=”Sum: “+ 0;
document.getElementById(“ans2”).innerHTML=”Difference: “+0;

function myFunction2(x,y)
document.getElementById(“ans1”).innerHTML=”Sum: “+ a;
document.getElementById(“ans2”).innerHTML=”Difference: “+b;
return a,b;

Running this script yields the following output:

2013-12-14 19_58_18-Mental Math Booster

When you click on “Get Numbers” you will see two randomly generated numbers for you to add and subtract in your head. When you think you have the answers figured out, click on “Calculate” to display the calculated sum and difference of the two numbers to see if you were right.

When I tested the script, I got the following two numbers to play with.


To mentally add these numbers, just break the process down to simpler steps. Instead of adding 293 as a whole, start by adding 200 to 844, which gives us 1044. Next we add 90 to get 1134 and finally we add 3 to get the sum of 1137.

Subtracting those two numbers is just as easy. Just round up 293 to 300 and subtract that from 844, which gives us 544. Then add the 7 you took away when you rounded up and you get 551, which is the answer.

This is really making math fun again. I still don’t know why it’s not taught like this at school.


Tags: ,

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: