Arithmetic-Geometric Mean (AGM) Calculator
Compute the arithmetic-geometric mean (AGM) of two positive numbers a and b by iterating the arithmetic and geometric means until they converge, with the full iteration table.
Input
Enter two positive numbers to iterate the arithmetic and geometric means until they converge and compute the arithmetic-geometric mean (AGM).
Both a and b must be positive numbers.
Result
AGM of 1 and 2
1.45679103
Arithmetic mean
1.5
Geometric mean
1.41421356
Iterations
4
Iteration steps
Each row shows the arithmetic mean, the geometric mean, and their difference per iteration. The closer the difference is to zero, the more it has converged.
| Step | Arithmetic mean | Geometric mean | Difference |
|---|---|---|---|
| 1 | 1.5 | 1.41421356 | 0.08578644 |
| 2 | 1.45710678 | 1.45647532 | 0.00063147 |
| 3 | 1.45679105 | 1.45679101 | 0.00000003 |
| 4 | 1.45679103 | 1.45679103 | 0 |
Each step computes a'' = (a + b) / 2 and b'' = the square root of ab. Since the arithmetic mean is always at least the geometric mean, the two values converge quadratically to a common limit.
How it works
- The arithmetic-geometric mean of two numbers a and b is the common limit reached by repeatedly replacing them with their arithmetic mean (a+b)/2 and geometric mean the square root of ab until the two values agree.
- Because the arithmetic mean is always at least the geometric mean, the gap between the two values shrinks quadratically each step, so the iteration converges to high precision in only a few steps.
- The arithmetic-geometric mean was studied by Gauss and is used to compute the complete elliptic integral of the first kind very efficiently.
- Both inputs a and b must be positive. When a and b are equal, the arithmetic-geometric mean is simply that value.
Reviews
Tell us what you think of this calculator.
Write a review
- Home
Arithmetic-Geometric Mean (AGM) Calculator