A flat map stretches a round world. A line that looks straight on the page is not necessarily the shortest route on the globe.
Picture a string on a globe
Imagine stretching a string tightly between your location and Makkah on a globe. Away from special cases such as opposite points, it follows the shorter great-circle arc. The direction the string leaves your location is the initial bearing used by this finder.
Know what a flat-map line represents
On a Mercator map, a straight line generally represents a constant compass bearing, called a rhumb line. A great-circle route often looks curved on that map. Neither drawing is broken; they represent different paths.
Look at North America
From New York and Toronto, the initial great-circle direction toward Makkah heads northeast, even though a casual flat-map reading may suggest southeast. The city pages calculate this from their coordinates rather than choosing a direction by visual guesswork.
Use the starting bearing where you stand
The direction along a great circle changes as you move along it. For a stationary location, use the initial bearing calculated there, measured clockwise from true north. The site uses a spherical Earth approximation; this is an explanation of its mathematics, not a ruling about disputed methods. Ask a qualified scholar for religious questions.
Common questions
Why does the line curve on my map?
Map projection can turn a great-circle route into a curved line even though it is the shortest path on a sphere.
Should I keep the same bearing as I travel?
No. Recalculate from your current position because the initial bearing changes.
Is this an exact model of Earth?
No. It uses a sphere; Earth is slightly flattened, so more detailed geodesic models can give small differences.