Here are few facts:
- A flight is basically climbing, staying high, then descending toward a runway
Changes in altitude increase the distance an aircraft flies. Given the climb/descent angle, this increase may be insignificant, but it still exists.
- The path followed by an airliner may not be direct
Given many elements (TSA, other traffic,...) I imagine an airliner can almost never take a direct route. Not to mention the path leading to the approach.
- An airport may have several runways whose length may not be the same
The departure point may be the parking position, the beginning of the runway, the end of the runway, the point where the aircraft reaches $V_2$,... The same goes for the arriving point.
- The precision of the maximum range of an aircraft is really precise
When looking at ailiners' performances, one key figure seems quite strange: the range. It seems quite precise (few miles). Lets take the ERJ-140ER as example. Its maximum range is 1250nm. Given this number, I imagine the precision is less than 10nm (3 significant digit), i.e. about 3 to 4 times an international airport's runway length (4km for dubai international airport).
Given all those elements, how is a leg length (distance of 1 flight between 2 airports) calculated for an airliner?