# Calculating distance scale factor by latitude for Mercator

This was really inconvenient topic to google out - so I'm asking for clarification, did I understood things correctly.

I'm talking about measuring short distances in Mercator projection (3857). You can calculate distance in map units (using Pythagoras theorem). In equator, it equals to distance on earth (scale factor = 1); if you move towards poles, distance in map units and in earth are not equal anymore - scale factor starts to increase.

Question is: how to calculate scale factor for given latitude?

Did I understood correctly, formula is `factor = 1 / cos(latitude)`?

You are absolutely correct.

From wikipedia's Mercator projection: scale factor = secant (latitude) = 1 / cosine (latitude)

Generally, divide map distance by the scale factor to get globe distance.

But what about "long" lines, at different latitudes, what scale factor to use?
According to EF Burkholder, for

• short lines, just calculate one scale factor
• 2–4 km lines, calculate an average scale factor, of the two ends
• long lines, use the Simpson rule:
• average scale factor, S = (S1 + 4 Sm + S2) / 6
• in other words, one sixth of each of the two end factors plus two thirds of the middle factor
• @martin f, that's awesome! I was under the impression that Mercator projection was good for bearing but measurement was an estimate at best. I had no idea that lengths could be calculated to any degree of accuracy. Thank you. Commented Apr 16, 2014 at 22:13
• As far as i'm aware, all map projections -- if the parameters are known -- have calculable distortions, hence calculable corrections. Commented Apr 17, 2014 at 0:12