Contraharmonic Mean Calculator

Calculate the square-weighted mean of nonnegative values and see exactly how each observation contributes.

Enter your values

CALCULATOR INPUT

Enter nonnegative values

Compute the square-weighted mean of a nonnegative data set and inspect each contribution.

Enter up to 50 nonnegative values; at least one must be positive.
Press Enter to calculate
Try an example
RESULT

Contraharmonic Mean

3
C=∑i=1nxi2∑i=1nxiC=\frac{\sum_{i=1}^{n}x_i^2}{\sum_{i=1}^{n}x_i}
Σxᵢ
10
Σxᵢ²
30
Count
4
Largest input
4
How the values comparePosition on a linear number line
x11
x22
x33
x44
Contraharmonic3
Step-by-step calculation 4 steps
  1. 1

    Add the observations: Σxᵢ = 1 + 2 + 3 + 4 = 10.

  2. 2

    Square each observation and add: Σxᵢ² = 1 + 4 + 9 + 16 = 30.

  3. 3

    Divide the sum of squares by the sum: C = 30 / 10 = 3.

  4. 4

    Larger observations receive more influence because they contribute quadratically to the numerator.

Calculation table 4 rows
Contraharmonic Mean Calculator calculation details
TermValueDetail
x11x² = 1
x22x² = 4
x33x² = 9
x44x² = 16
What this calculator shows

See how squared values contribute

Squared contributions

Each value enters the numerator as its square.

Auditable totals

Inspect the sum of values and sum of squares separately.

Large values matter more

The quadratic numerator gives larger observations extra influence.

Overview

What is a contraharmonic mean calculator?

The contraharmonic mean is the sum of squared observations divided by the sum of the observations. For nonnegative data with a positive total, it is at least as large as the arithmetic mean because larger values receive quadratic influence in the numerator. It is not the harmonic mean: the contraharmonic formula uses squares rather than reciprocals.

Important terms

Numerator Σxᵢ²
The total after squaring every observation.
Denominator Σxᵢ
The sum of the observations; it must be nonzero.
Quadratic influence
An observation contributes its square, so large values can dominate more strongly.
Contraharmonic mean
The ratio Σxᵢ² / Σxᵢ for a data set with a nonzero sum.

When this method is useful

  • Calculate a named mean when the square-over-sum definition is specifically required.
  • Compare a quadratic-weighted center with the ordinary arithmetic mean.
  • Inspect how large observations affect the numerator disproportionately.
  • Teach the difference between contraharmonic and harmonic means.
Formula

Formula and variables

C=∑i=1nxi2∑i=1nxiC=\frac{\sum_{i=1}^{n}x_i^2}{\sum_{i=1}^{n}x_i}
x_i
the ith nonnegative observation
n
the number of observations
Σx_i²
the sum of squared observations
Σx_i
the sum of the observations

Square each input and add those squares. Separately sum the original inputs. Divide the square total by the original-value total. The table shows both the original value and its square so the calculation can be checked row by row.

Domain note: Enter 1–50 finite nonnegative values with at least one positive value. Negative observations are rejected for this standard real-data mean, and an all-zero set is undefined because the denominator is zero.

How it works

How to use this calculator

  1. 1

    Enter nonnegative observations, separated by commas, spaces, or semicolons.

  2. 2

    Square each observation xᵢ and list its contribution xᵢ².

  3. 3

    Add the original observations to find Σxᵢ.

  4. 4

    Add the squares to find Σxᵢ².

  5. 5

    Divide Σxᵢ² by Σxᵢ and compare the answer with the arithmetic mean.

Worked examples

Step-by-step examples

Example 1

Problem: Find the contraharmonic mean of 1, 2, 3, and 4.

Substitution: Σxᵢ² = 1 + 4 + 9 + 16 = 30; Σxᵢ = 10; C = 30/10

Result: 3

The contraharmonic mean is 3. The ordinary arithmetic mean is 2.5; the larger observations pull the square-weighted mean upward.

Example 2

Problem: Find the mean of 0, 3, and 6.

Substitution: Σxᵢ² = 0 + 9 + 36 = 45; Σxᵢ = 9; 45/9

Result: 5

Zero is allowed and contributes zero to both totals.

Example 3

Problem: Find the mean of 2, 2, 5, and 11.

Substitution: Σxᵢ² = 4 + 4 + 25 + 121 = 154; Σxᵢ = 20; 154/20

Result: 7.7

The value 11 contributes 121 to the numerator, making its influence especially visible.

Method knowledge

Rules, edge cases, and related ideas

Large values get extra influence

The numerator squares each observation, increasing the relative contribution of larger values.

Zero values are permitted

A zero contributes zero to both sums, provided the total denominator remains positive.

Definedness matters

If every observation is zero, the denominator is zero and there is no contraharmonic mean.

Edge cases and limitations

  • A single positive observation returns itself.
  • An all-zero data set is rejected because it gives 0/0.
  • Zero values may appear alongside positive values.
  • Negative observations are rejected in this calculator's nonnegative-data convention.

How this differs from a related concept

The arithmetic mean is Σxᵢ/n. The harmonic mean is n/Σ(1/xᵢ) for positive data. The contraharmonic mean is Σxᵢ²/Σxᵢ and emphasizes large values. These means answer different questions and should not be swapped without a reason.

Interpretation

Understand the result

For nonnegative data with a positive sum, the contraharmonic mean is between the minimum and maximum and is no smaller than the arithmetic mean. A high result relative to the arithmetic mean indicates that large observations are receiving greater influence. This measure should only be used when its square-weighted definition is appropriate to the task.

Common mistakes

  • Dividing the sum of squares by the number of observations.
  • Confusing the contraharmonic formula with the reciprocal-based harmonic mean.
  • Assuming zeros always make the calculation undefined; only an all-zero set does here.
  • Ignoring how strongly large observations affect the squared numerator.

Frequently asked questions

What is the contraharmonic mean formula?

It is the sum of the squared values divided by the sum of the original values: C = Σxᵢ² / Σxᵢ.

Can the contraharmonic mean include zero?

Yes, as long as at least one input is positive so the denominator is not zero.

Why can it be higher than the average?

Large values contribute their squares to the numerator, so they receive more influence than in an ordinary arithmetic mean.

Can I enter negative numbers?

This calculator restricts the standard data set to nonnegative observations. Signed inputs can invalidate the usual mean interpretation.

What happens if all values are zero?

The formula becomes 0/0, so the mean is undefined and the calculator reports the domain error.

References & technical sources

Keep calculating

Related calculators