Skip to content
Various examples of calculating pi via numerical integration
Jupyter Notebook
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Numerical Integration for Pi.ipynb

Numerical Integration for Pi

Author: Jonah Miller (


This is a Jupyter notebook that shows several ways to compute the number pi via numerical integration. This was inspired by discussion on several posts on reddit's DataIsBeautiful subreddit.

Here's a summary of the results:

summary plot

The area under the curve on the left is pi. The plot on the right compares errors in various estimates of that area.


Just click on integration-for-pi.ipynb in the repository.

Playing with it yourself:

If you have python3, Jupyter, and the scientific python stack installed, just run:

git clone
cd numerical integration-for-pi
jupyter notebook
You can’t perform that action at this time.