Logarithmic Mean Calculator
Find the log mean of two positive numbers with arithmetic and geometric means alongside.
What it does
The logarithmic mean averages two positive numbers when the gap between them changes along a process. It is defined as their difference divided by the difference of their natural logs, and it appears in heat exchanger and mass transfer calculations.
Like any mean it lies between the two inputs. It sits above the geometric mean and below the arithmetic mean, and it equals the shared value when both inputs are the same. That places it neatly between two more familiar averages.
The tool takes two positive numbers and returns the logarithmic mean beside the arithmetic and geometric means. Seeing all three at once makes the ordering easy to check and helps you decide which average suits the problem at hand.
A direct formula exists, so no guessing or iteration is needed. The only care is at equal inputs, where the log difference is zero. The tool returns the input itself there, which is the correct limiting value.
How to use
- Enter the first positive number.
- Enter the second positive number.
- Read the logarithmic mean in the main result.
- Compare it with the geometric and arithmetic means shown below.
- Check the ordering: geometric at or below log mean at or below arithmetic.
- Try equal inputs to see the mean collapse to that single value.
Formula
- a, b
- Two strictly positive real numbers.
- ln
- The natural logarithm, base e.
- L(a,b)
- The logarithmic mean of the pair.
Natural logs are used, so both inputs must be positive. When a equals b the fraction becomes zero over zero; the limit is a itself and the tool applies that directly. Swapping the order of a and b changes both signs and leaves the value unchanged, so the mean is symmetric. The same number can also be written as an integral from zero to one of a raised to one minus t times b raised to t.
Worked example
Example: log mean of 10 and 20
Inputs a = 10 and b = 20.
- Difference: 20 - 10 = 10.
- Log difference: ln 20 - ln 10 = ln 2 = 0.693147.
- Log mean: 10 / 0.693147 = 14.427.
- Arithmetic mean: (10 + 20) / 2 = 15.
- Geometric mean: sqrt(10 x 20) = sqrt(200) = 14.1421.
- Ordering check: 14.1421 < 14.427 < 15.
- Tool shows 14.427 as the main result.
Reference table
| a | b | L(a,b) |
|---|---|---|
| 1 | 2 | 1.4427 |
| 1 | 10 | 3.9087 |
| 10 | 20 | 14.427 |
| 5 | 5 | 5 |
| 100 | 200 | 144.2695 |
Limits
- Both inputs must be strictly positive; zero and negatives are rejected.
- Equal inputs return the input value rather than an average of two distinct figures.
- The measure assumes a logarithmic relationship between the endpoints.
- Very close but unequal inputs can lose precision in the log difference.
Common mistakes
- Using log base 10 in place of the natural log.
- Averaging the logarithms instead of dividing the difference.
- Forgetting the equal-input case and reading a zero.
- Assuming the result always matches the arithmetic mean.
- Entering a negative number and expecting a real answer.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the log mean of 1 and 2?
1 / ln 2 = 1.4427.
What is the log mean of 5 and 5?
5, because equal inputs return the shared value.
For 10 and 20, which is larger: geometric mean or log mean?
The log mean, 14.427 against 14.1421.
Questions
What is the logarithmic mean?
The difference of two numbers divided by the difference of their natural logs.
Where is it used?
In heat transfer, mass transfer, and cases where a driving difference changes across a device.
Is it always between the inputs?
Yes, for positive inputs it lies between them.
How does it compare with the arithmetic mean?
It is never larger than the arithmetic mean.
What happens when the two numbers are equal?
The mean equals that number.
Can it handle zero?
No. The natural log is undefined there, so the tool rejects it.
Sources
- Australian Journal of Mathematical Analysis and Applications: Scope of the Logarithmic Mean
- Furuichi and Eghbali Amlashi: On bounds of logarithmic mean and mean inequality chain