Praise be to Allah.
Is ‘Eid prayer obligatory?
The ‘Eid prayer is an individual obligation (fard ‘ayn) for every man who is able to do it, according to the more correct of the two scholarly opinions.
Offering ‘Eid prayer at home: Prescribed?
If you cannot go to the prayer because of your health, then you do not have to do anything. But is it prescribed to do it at home? There is a difference of opinion among the fuqaha concerning that, but the majority are of the view that that is prescribed, unlike the Hanafis.
Al-Muzni narrated from al-Shaf’i (may Allah have mercy on him) in Mukhtasar al-Umm (8/125): “He may offer the ‘Eid prayer on his own in his house, as may the traveller, the slave and the woman .”
Al-Kharashi (Maliki) said: “It is mustahabb for the one who has missed the ‘Eid prayer with the imam to offer this prayer, but should he do it in congregation or separately? There are two opinions.” (Sharh al-Kharashi (2/104)
Al-Mardawi said in al-Insaf (Hanbali): “If he has missed the prayer (meaning the ‘Eid prayer ), it is mustahabb to him to make it up in the same manner (i.e., as the imam prayed it).”
Ibn Qudamah said in al-Mughni (Hanbali): “He has the choice: if he wishes he may pray it on his own, and if he wishes he may pray it in congregation.”
In al-Durr al-Mukhtar ma’a Hashiyat Ibn ‘Abidin (2/175 – Hanafi) it says: “He should not pray it on his own if he has missed it with the imam.”
Shaykh al-Islam Ibn Taymiyah favoured the Hanafi view, and it was also regarded as more correct by Shaykh Ibn ‘Uthaymin (may Allah have mercy on him), as it says in al-Sharh al-Mumti’ (5/156).
How to pray ‘Eid prayer at home?
In Fatawa al-Lajnah al-Daimah li’l-Ifta (8/306) it says: “‘Eid prayer is a communal obligation (fard kifayah): if it is undertaken by enough people, the sin of not doing it is waived from the rest.
If a person misses it and wants to make it up, it is mustahabb for him to do that, so he should pray it in the proper manner but without a khutbah following it. This is the view of Imam Malik, al-Shafi'i, Ahmad, al-Nakha’i and other scholars. The basic principle concerning that is the words of the Prophet (blessings and peace of Allah be upon him): “If you come to the prayer then come walking, calmly and with dignity. Whatever you catch up with, pray, and whatever you miss, make it up.”
And it was narrated from Anas (may Allah be pleased with him) that if he missed the ‘Eid prayer with the imam, he would gather together his family and freed slaves, then his freed slave ‘Abd-Allah ibn Abi ‘Utbah would stand up and lead them in praying two rak’ahs, saying the takbirs in them.
If a person arrives on the day of ‘Eid when the imam is delivering the khutbah, he should listen to the khutbah, then make up the prayer after that, so that he may combine both benefits. And Allah is the source of strength. May Allah send blessings and peace upon Prophet Muhammad and his family and Companions.” (Standing Committee for Academic Research and Issuing Fatwas)
And Allah knows best.