Short answer
It depends on how long you stay. In the Hanafi school you shorten if you intend to stay fewer than 15 days in Makkah; 15 or more makes you a resident who prays in full. Behind the imam of the Haram, a resident, you always pray in full. Whether days in Mina count with Makkah is debated today, so ask a mufti.
A traveller prays two rakats for Zuhr, Asr and Isha until he intends to stay 15 days or more in one place. Classically Makkah and Mina are separate places, so days in each are not added together. A traveller praying behind a resident imam follows him and prays four.
Other madhhabs
- Shafi'i
- Intending to stay four days or more, not counting the days of arrival and departure, ends travel.
- Maliki
- Intending to stay four full days or more ends travel.
- Hanbali
- Intending to stay more than four days (over twenty prayers) ends travel.
Explanation
The Prophet ﷺ stayed about ten days in and around Makkah during the Farewell Hajj and prayed two rakats throughout. Ibn Umar said he prayed two rakats at Mina with the Prophet, with Abu Bakr and Umar, and with Uthman early in his rule. The Hanafi limit of 15 days comes from reports of Ibn Umar and Ibn Abbas.
- Count your days: if you arrive in Makkah and intend to stay 15 days or more before leaving for Mina, you are a resident in Makkah and pray in full. Less than that, you shorten.
- The Mina question: classical Hanafi texts treat Mina as a separate place. Makkah's buildings now reach Mina, and some contemporary Hanafi muftis treat it as part of the city, so days there join your Makkah days. Others keep the classical view. Follow a reliable mufti.
- In the Haram: the imams are residents, so pray four behind them. Shortening applies when you pray alone or behind a traveller.
- Sunnah prayers: a traveller may leave them when busy, but Fajr's sunnah and witr are kept.
For the full travel rules see qasr prayer and how far you must travel.
Ask a mufti about your own case. This answer explains the general ruling. When the details of your situation matter, as they do here, ask a qualified mufti and give them the full facts. Where to ask a scholar.
The evidence
Quran, Surah An-Nisaa 4:101
وَإِذَا ضَرَبْتُمْ فِى ٱلْأَرْضِ فَلَيْسَ عَلَيْكُمْ جُنَاحٌ أَن تَقْصُرُوا۟ مِنَ ٱلصَّلَوٰةِ إِنْ خِفْتُمْ أَن يَفْتِنَكُمُ ٱلَّذِينَ كَفَرُوٓا۟ ۚ إِنَّ ٱلْكَٰفِرِينَ كَانُوا۟ لَكُمْ عَدُوًّۭا مُّبِينًۭا ﴿١٠١﴾
And when you travel throughout the land, there is no blame upon you for shortening the prayer, [especially] if you fear that those who disbelieve may disrupt [or attack] you. Indeed, the disbelievers are ever to you a clear enemy.
The basis of shortening while travelling.
Sahih al-Bukhari 1082
Sahih... صليت مع النبي صلى الله عليه وسلم بمنى ركعتين ...
"I prayed two rakats with the Prophet at Mina."
Prayers were shortened at Mina.
Sahih al-Bukhari 1081
Sahih... أقمنا بها عشرا ...
"We stayed there for ten days."
The Prophet shortened during his stay for Hajj.
Where the ruling is recorded
- al-Hidaya, Kitab al-Salah, bab salat al-musafir. Fifteen days makes a resident; two places are not joined.
- Radd al-Muhtar (Ibn Abidin), Bab salat al-musafir. Makkah and Mina as separate places for the intention of stay.
- al-Mughni (Ibn Qudama), Kitab al-Salah, bab salat al-musafir. The Hanbali measure of the stay.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.