Geometric Calculation of Qibla Direction

Shaikh Husain Jamali

The direction of Qibla at any point on the Earth’s surface, assuming the Earth to be a perfect sphere, is given by the great circle passing through that point and the Kaabatullah at Makkah. The angle between the true north at a place and the qibla direction there can be obtained by solving the spherical triangle whose vertices are, the north pole, the intended place, and Makkah. Determination of qibla direction for daily prayers is not as easy as just calculating it from Spherical geometry equation:

Q = tan-1 sin (Ld – Lm)
[ (cos Fd) x (tan Fm) ] – [ (sin Fd) x (cos Ld – Lm) ]
Where: Fd = Latitude of Desired Location
Ld = Longitude of Desired Location
Fm = Latitude of Mecca (+21.45° north of Equator)
Lm = Longitude of Mecca (-39.75° east of Prime Meridian)

An example: Bakersfield California ( Fd = +35°23´ = 35.3833°
Ld = 119°1´ = 119.0166° )

Q = tan-1 sin (119.0166 – (-39.75))
[ (cos 35.3833) x (tan 21.45) ] [ (sin 35.3833) x (cos 119.0166 – (-39.75)) ]
= [ { .3622 } ÷ { .3203 – (-.5397) } ]
= +22.863 degrees
= +22°51´46.8″ East from True North

This angle has to be modified by the amount of Magnetic Declination because there are two Norths involved. One is the True North (TN) and the other is the Magnetic North (MN). The problem arises when the equation gives the angle from the TN and the compass gives the angle from the MN. The difference between the two Norths is called the Magnetic Declination (MD). The reading of the compass has to be modified and compensated by the value of this MD for the location. The values for these MDs are available from the Canadian National Geophysical Laboratory website.

To obtain this MD you need to provide the Latitude and the Longitude of the location for which the qibla direction is desired (Fd and Ld from above) along with the year it is needed for as this MD varies slightly from year to year. The Latitudes & the Longitudes for most cities of the world are available at Google Maps.

To be very accurate in measuring the qibla direction, it is best to use a portable Marine compass of a minimum 6″ card diameter, even with a good quality instrument the most accuracy you can expect is upto ±½ degrees (30 minutes). I think you will have to try to get the best accuracy you find possible and Allah will understand that your tools are only those of humans.

The MD provided at the above site will be in terms of degrees & minutes East or West. If it is E variation, the True angle will be that much to the right of your magnetic compass measurement. If it is W then the MD gets added to your calculated angle to give the True angle to be measured on the magnetic compass.

For example, MD for Bakersfield CA is 14° 22´ E and the calculated angle for this location is 22° 51´ 46.8″ (Required magnetic compass angle added to MD of 14° 22´ should equal calculated angle from Spherical geometry equation, 22° 51´ 46.8″). This gives an angle of 8° 29´ 46.8″ to be read on the magnetic compass to truly face Kaaba at this location.

When you put your magnetic compass on the ground at your site and make it level (making sure there is no magnetic materials, tools, etc. near the compass that can have an effect on the compass reading), the N marking on the compass card will point to the MN. TN is 14° 22´ further left of this N marking. Then 8° 29´ 46.8″ to the right of N marking is the magnetic bearing to Kaaba, which is same as 22° 51´ 46.8″ true bearing towards Kaaba as calculated by the equation.

Leave a Reply