# Harmonic Number Calculator

Our **harmonic number calculator** is the perfect solution for anyone seeking to find the $n$**-th harmonic number** or to calculate the sum of the **harmonic series** of the **first** $n$ **terms**.

It is common to have misconceptions regarding the harmonic number and harmonic series. So we shall discuss some basic concepts on this subject. Specifically, let's answer these questions:

- What is a
**harmonic number**and its equation? - How do you
**calculate**a harmonic number for integers and non-integers? - What is the formula for the sum of harmonic series?
- What is the relation between
**harmonic number**and**harmonic series**?

Whether you're a novice or an advanced reader, we hope that you'll learn something interesting here today. So grab your favorite snacks and explore this topic with us!

## What is a harmonic number? Harmonic number equation

We define the $n$**-th harmonic number** as the **sum** of the **reciprocals** of the **first $n$ natural numbers**:

where:

- $H_n$ is the $n$
**-th harmonic number**; and - $n$ is any
**natural number**.

As a consequence of Bernard's postulate, $H_n$ is never an integer unless $n =1$.

🔎 Notice that the harmonic numbers are a rough approximation of the natural logarithm, which is given by $\ln n = \int_1^n \frac{1}{x}dx$. To learn more about the natural logarithm, use our natural log calculator.

## How do you calculate a harmonic number for integers?

To calculate the **harmonic number** **Hₙ** for any *integer* **n**, use the following steps:

**Divide****1**by the first**n****natural numbers**and gather them in a sequence to get:**1/1, 1/2, 1/3, … 1/n**.**Add**every number in this sequence to get theas*n-th*harmonic number**H**._{n}= 1 + 1/2 + 1/3 + … + 1/n- Verify your answer using our harmonic number calculator.

For example, to calculate the 5th harmonic number $H_5$, we must evaluate the sum:

Test your understanding of how to find a harmonic number: Calculate the **8th harmonic number** $H_8$ yourself using the harmonic number equation. You can verify your answer using our calculator or our FAQ section.

## How do you find the harmonic number of a non-integer?

Strictly speaking, harmonic numbers are defined only for **natural numbers**. We can use them for various purposes, including finding the bessel function values. However, we can use the following expression to * interpolate* harmonic numbers for

**non-integers**:

where:

- $\psi(n)$ is the
**digamma function**; and - $\gamma$ is the , which is roughly $0.577$.

Let's break this down, starting with the **digamma** function, which we define as the **logarithmic derivative** of the **gamma function**:

where:

- $\ln(x)$ is the
**natural logarithmic function**; and - $\Gamma(x)$ is the
**gamma function**.

Please don't panic — you won't need to evaluate these complicated functions to find our harmonic number. Still, it helps to learn more about this gamma function using our gamma function calculator.

There are many methods to evaluate this digamma function, but the simplest one we can use is the following expression, which is valid for any **complex number** $z$ whose real component is positive (i.e., $\Re(z)>0$):

Re-writing this equation for $z = n + 0i$, where $n$ is an arbitrary **positive non-integer**, we would get:

Combining this equation with the initial interpolation relation we've introduced ($\psi(n) = H_{n-1} - \gamma$), we can deduce that

And *voila*! An equation to evaluate harmonic numbers for any **non-integer** $n$ is at hand! And as we promised, you needn't calculate any extra functions to find the answer. Also, you need not sum this series to infinity — this series will converge after a finite number of iterations.

Now that you've learned how to calculate harmonic numbers, let's find out how they are related to calculating the sum of harmonic series.

## Calculating harmonic series sums and harmonic numbers

The **harmonic series** is the **sum** of the **reciprocals** of ** all natural numbers**, given by:

While its definition is similar to that of a harmonic number, you can see from the formula for the sum of harmonic series it is an **infinite series**. The harmonic number is considered a * partial sum* of the harmonic series, where the series contains the reciprocals of the first $n$

**natural numbers**, instead of

**.**

*all*natural numbersIf you're interested in how harmonic series and music are related, we urge you to check out our harmonic series calculator.

## How to use this harmonic number calculator

This harmonic number calculator is easy to use and is always here to help you. To calculate the harmonic number of a positive number $n$, or to calculate the sum of harmonic series up to the $n$-th term:

- Enter the
**positive number**in the field labeled`n`

. - This calculator will evaluate the $n$-th
**harmonic number**$H_n$ and display it below.- For
**integer values of**$n$, if $H_n$ has a*determinable fraction form*, this calculator will provide it alongside its*decimal form*. - For
**non-integer values of**$n$, we can only provide $H_n$ in*decimal form*.

- For

Note that we round all decimal answers to 5 decimal places. Also, to keep the computational time to a minimum, we've capped the **maximum** value of an **integer** $n$ at $10^6$, beyond which the algorithm will cause a perceptible lag in most machines. For the same reason, a **non-integer** $n$ greater than $10^3$ is not allowed.

Don't hesitate to contact us if you want to compute a harmonic number of any number larger than these limits.

## FAQ

### What is the 8ᵗʰ harmonic number?

**H₈ = 761/280 = 2.71786**. To calculate the 8th harmonic number yourself, follow these instructions:

**Divide****1**by the first**8 natural numbers**and gather them in a sequence to get:**1/1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8**.**Add**every number in this sequence to get theas*n-th*harmonic number**H**._{n}= 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6 + 1/7 + 1/8 = 761/280 = 2.71786- Verify your answer using our
**harmonic number calculator**.

### Is the harmonic series a p-series?

**Yes.** The harmonic series is a *special case* of p-series given by **∑ 1/nᵖ**, where **p = 1**.

### Does the harmonic series converge?

**No**, the harmonic series **does not converge**. The consecutive numbers in the series do not get small *fast enough* to enable a convergence.