Midpoint of Two Numbers Calculator
The midpoint of two numbers is the value exactly halfway between them, found by adding the two numbers and dividing by two. It is identical to the arithmetic mean of a pair, sits at equal distance from each endpoint, and is the basic step inside binary search and the bisection root-finding method. This calculator takes any two real numbers, including negatives and decimals, and returns the midpoint along with their sum, the absolute difference between them, and the half-difference that each endpoint lies from the centre.
Midpoint formula
Midpoint = (a + b) / 2
Sum = a + b
Absolute difference = |a - b|
Half-difference = |a - b| / 2
The midpoint is the arithmetic mean of the two endpoints. Each endpoint lies the half-difference away from the midpoint, one above and one below.
About the midpoint
- The midpoint of two numbers is always between them, inclusive of the case where they are equal.
- For two equal inputs the midpoint equals that value and the difference is zero.
- The midpoint of negative and positive numbers can be negative, zero or positive.
- Binary search and the bisection method repeatedly take the midpoint of an interval.
- The midpoint of two coordinates on a line is one component of the geometric midpoint formula.
Midpoint: frequently asked questions
What is the midpoint of two numbers?
The midpoint, or arithmetic mean, of two numbers a and b is their sum divided by two: (a + b) / 2. It is the value exactly halfway between them on the number line. The midpoint of 4 and 10 is 7.
Is the midpoint the same as the average?
For exactly two numbers, the arithmetic mean and the midpoint are the same value. For three or more numbers the arithmetic mean is the sum divided by the count, but the midpoint usually refers only to the value halfway between two endpoints.
Can the two numbers be negative?
Yes. The formula works for any real numbers. For example the midpoint of -6 and 2 is (-6 + 2) / 2 = -2, which sits exactly halfway between them.
What is the half-difference?
It is half the absolute distance between the two numbers, that is |a - b| / 2. It tells you how far each number sits from the midpoint, since both endpoints are equidistant from the centre.
Where is the midpoint used?
The midpoint underlies the bisection root-finding method, coordinate geometry midpoints, binary search splits, and any time you need the value exactly between two bounds, such as a temperature setpoint or a price halfway between two quotes.
Official sources
- NIST Digital Library of Mathematical Functions: DLMF home.
- National Institute of Standards and Technology DADS: Arithmetic mean.
Reviewed by the CalculatorHub team, edited by James Graham, 16 June 2026. See our methodology.