During my time calculating Pi using PHP ( http://coderwall.com/p/g35wya?i=1&p=1&q= ), I decided it was time to try it with JavaScript.

Here is the jsFiddle: http://jsfiddle.net/WfpzT/4/

This script will allow you to enter an **accuracy** number and then calculate Pi using that number of iterations. The higher the accuracy, the more accurate your Pi calculations will be.

*More information about this method of calculating Pi can be found here: http://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80*