# Arithmetic-Geometric Mean Calculator

This arithmetic-geometric mean calculator can be employed to determine iterated means, such as the arithmetic-geometric mean (AGM), the geometric-harmonic mean (GHM), the arithmetic-quadratic mean (AQM), and the arithmetic-harmonic mean (AHM).

Simply insert the values for x and y, choose the two types of means that should be applied, one from each drop-down menu, and click on the "Calculate Mean" button. The order in which you choose the types of means you want to apply is not of significance; as such, if you wish to determine the AGM, you can select "Geometric" from the first menu and "Arithmetic" from the second; the output will be the same.

## Arithmetic-Geometric Mean (AGM)

The AGM is an iterative mean that operates by determining a pair of calculations.

To compute the AGM of two given numbers, *x* and *y*, you need to start by calculating their arithmetic and geometric means, as follows:

(x + y)/2 and sqrt(xy)

You can then use the outputs to determine the arithmetic and geometric means of the two new numbers. You subsequently repeat the process multiple times with every new pair of numbers that are computed. In due course, the algorithm will stabilize at a fixed number. This number represents the AGM of the two numbers with which you started.

An alternative means of expressing the AGM of *x* and *y* is to perform two dependent recursive equations:

A_{n+1} = (A_{n} + B_{n})/2

B_{n+1} = sqrt(A_{n}B_{n}),

where A_{0} = x, B_{0} = y, and sqrt = square root.

As *n* is infinite, the values of A_{n} and B_{n} will converge at a single number. This number represents the AGM of *x* and *y*. Providing *x* and *y* are not equal, the AGM is always lower than the arithmetic mean and higher than the geometric mean.

## Geometric-Harmonic Mean (GHM)

The Geometric-Harmonic Mean (GHM) represents a further example of an iterative average.

If C_{0} = x and D_{0} = y, and

C_{n+1} = 2C_{n}D_{n}/(C_{n} + D_{n})

D_{n+1} = sqrt(C_{n}D_{n}),

the consistent value of the sequence is the GHM of *x* and *y*. There are some interesting correlations between AGM(x,y) and GHM(x,y):

AGM(x,y)GHM(x,y) = xy

GHM(x,y) = xy/AGM(x,y) = 1/AGM(x^{-1}, y^{-1})

## Arithmetic-Harmonic Mean (AHM)

Iterating the harmonic and arithmetic means results in the geometric mean.

## Contraharmonic-Harmonic Mean

Iterating the contraharmonic and harmonic means results in the arithmetic mean.

## Contraharmonic Mean

The contraharmonic mean of *x* and *y* is as follows:

(x^{2} + y^{2})/(x + y)

For *n* values, you can compute the contraharmonic mean as follows:

(x_{1}^{2} + x_{2}^{2} + ... + x_{n}^{2})/(x_{1} + x_{2} + ... + x_{n})

## Arithmetic Mean

The average of two or more numbers is referred to as the mean. The arithmetic mean represents the most commonly employed mean. Calculating the arithmetic mean involves adding up all the values and dividing them by the number of values.

For *n* values, the arithmetic mean is (x_{1} + x_{2} + ... + x_{n})/n

For instance, the arithmetic mean of 3, 4, and 5 is (3 + 4 + 5)/3 = 4.

## Geometric Mean

The geometric mean of two numbers *x* and *y* is represented as follows:

sqrt(xy)

The geometric mean of three numbers, *x*, *y*, and *z*, is the cube root of xyz, or (xyz)^{1/3}.

The geometric mean of *n* numbers is as follows:

(x_{1} ยท x_{2} ยท ... ยท x_{n})^{1/n}

## Harmonic Mean

The harmonic mean is commonly employed to average ratios in science and business applications. Given two numbers, *x* and *y*, the harmonic mean is 2xy/(x + y).

Given three numbers, *x*, *y*, and *z*, the harmonic mean is 3xyz/(xy + xz + yz).

The harmonic mean of *n* numbers is as follows:

n/(1/x_{1} + 1/x_{2} + ... + 1/x_{n})

## Root Mean Square (Quadratic Mean)

The root mean square, which is also commonly referred to as the quadratic mean, is frequently employed in statistical and engineering applications, especially when negative data points are under consideration. One example of the root mean square is the standard deviation of a set of numbers (I.e., it is the root mean square of the variations between the arithmetic mean and each data point).

When given two numbers, *x* and *y*, the quadratic mean is sqrt[(x^{2} + y^{2})/2].

For *n* variables, it is as follows:

sqrt[(x_{1}^{2} + x_{2}^{2} + ... + x_{n}^{2})/n]