Calculating Harmonic Mean

Harmonic mean is calculated by dividing the number of observations (n) by the sum of reciprocals of all observations.

Harmonic mean has some applications in finance. One application is to calculate the average purchase cost of shares purchased over time.

Let’s say that an investor purchased a stock worth $100 for two months. The share price at the time of each purchase was 5 and 7. What will be the average purchase price? We can calculate this as follows.

The number of stocks purchased in the two months are $100/5 = 20 and $100/7 = 14.286. Total number of shares purchased is 34.286 for a total cost of $200. Average purchase price will be = $200/34.286 = 5.833. This is in fact the harmonic mean.

We can use the harmonic mean formula to calculate this.

The relationship between Harmonic Mean, Arithmetic Mean, and Geometric Mean is as given below:

Harmonic Mean < Geometric Mean < Arithmetic Mean

Related Downloads

Data Science in Finance: 9-Book Bundle

Data Science in Finance Book Bundle

Master R and Python for financial data science with our comprehensive bundle of 9 ebooks.

What's Included:

  • Getting Started with R
  • R Programming for Data Science
  • Data Visualization with R
  • Financial Time Series Analysis with R
  • Quantitative Trading Strategies with R
  • Derivatives with R
  • Credit Risk Modelling With R
  • Python for Data Science
  • Machine Learning in Finance using Python

Each book includes PDFs, explanations, instructions, data files, and R code for all examples.

Get the Bundle for $39 (Regular $57)
JOIN 30,000 DATA PROFESSIONALS

Free Guides - Getting Started with R and Python

Enter your name and email address below and we will email you the guides for R programming and Python.

Data Science in Finance: 9-Book Bundle

Data Science in Finance Book Bundle

Master R and Python for financial data science with our comprehensive bundle of 9 ebooks.

What's Included:

  • Getting Started with R
  • R Programming for Data Science
  • Data Visualization with R
  • Financial Time Series Analysis with R
  • Quantitative Trading Strategies with R
  • Derivatives with R
  • Credit Risk Modelling With R
  • Python for Data Science
  • Machine Learning in Finance using Python

Each book comes with PDFs, detailed explanations, step-by-step instructions, data files, and complete downloadable R code for all examples.