The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Bakhshali Formula

Date: 12/15/2002 at 04:35:00
From: Murtaza Khaliq
Subject: I have a formula for calculating sq-roots by hand

I have been going through the site and have noticed that people have 
been asking for a formula for calculating square roots. I came across 
this "Bakhshali formula" only a few weeks ago myself. I hope it is 

Q = (A^2 + b) = A + b/2A - (b/2A)^2/[2(A + b/2A)]

In the case of a non-square number, subtract the nearest square 
number, divide the remainder by twice this nearest square; half the 
square of this is divided by the sum of the approximate root and the 
fraction. This is subtracted and will give the corrected root. 

Taking Q = 41, then A = 6, b = 5 and we obtain 6.403138528 as the 
approximation to 41 = 6.403124237. Hence we see that the Bakhshali 
formula gives the result correct to four decimal places. 

More info can be found in the article at the MacTutor History of 
Mathematics archive at St. Andrews University (select The Bakhshali 

   History Topics 


Date: 12/16/2002 at 15:11:56
From: Doctor Peterson
Subject: Re: I have a formula for calculating sq-roots by hand

Hi, Murtaza.

In copying the formula, you lost the square root signs; I'll rewrite 
it as

  sqrt(Q) = sqrt(A^2 + b) = A + b/(2A) - (b/(2A))^2/[2(A + b/(2A))]

It's interesting to compare an ancient method like this to those of 
modern times and other historical periods. I see a strong resemblance 
between this and the divide-and-average method covered in our FAQ, 
which is a special case of Newton's method, and was known in ancient 

   Square/cube roots without a calculator 

   Newton's Method and Square Roots 

Let's try applying the divide-and-average method to Q = A^2 + b. Our 
first guess will be A, so we divide Q by A and average that with A:

  B = (A + Q/A)/2

    = (A + (A^2 + b)/A)/2

    = (A + A + b/A)/2

    = A + b/(2A)

Now let's repeat the process a second time, dividing Q by B and 

  C = (B + Q/B)/2

    = (A + b/(2A) + (A^2 + b)/(A + b/(2A)))/2

Note that

  (A + b/(2A))^2 = A^2 + b + (b/(2A))^2

so that

  A^2 + b = (A + b/(2A))^2 - (b/(2A))^2


  (A^2 + b)/(A + b/(2A)) = A + b/(2A) - (b/(2A))^2/(A + b/(2A))

This gives

  C = A + b/(2A) - (b/(2A))^2/[2(A + b/(2A))]

which is exactly Bakhshali's formula! So what he did amounts to 
repeating the traditional algorithm for two steps. No wonder the page 
you referred to says that it is faster than Newton's algorithm; it 
should take half as many steps to get the same accuracy (assuming you 
apply it iteratively). I'm not sure whether it is any easier than 
just doing that explicitly; but it is certainly interesting to see! 
Thanks for calling our attention to it.

- Doctor Peterson, The Math Forum 
Associated Topics:
High School Square & Cube Roots
Middle School Square Roots

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.