The Shafi'i school (Arabic: ٱلْمَذْهَب ٱلشَّافِعِيّ, romanized: al-madhhab al-shāfiʿī) is one of the four major schools of Islamic jurisprudence. It belongs to the Ahl al-Hadith tradition within Sunni Islam. It is named after the Muslim scholar, jurist, and traditionist al-Shafi'i (c. 767–820 CE), also known as "the father of Muslim jurisprudence", in the early 9th century. One who subscribes to the Shafi'i school is called a Shafi'i (Arabic: ٱلشَّافِعِيّ, romanized: al-shāfiʿī, pl. ٱلشَّافِعِيَّة, al-shāfiʿīyah or ٱلشَّوَافِع, al-shawāfiʿ).
The other three schools of Sunnī jurisprudence are Ḥanafī, Mālikī and Ḥanbalī. Like the other schools of fiqh, Shafiʽi recognize the First Four Caliphs as the Islamic prophet Muhammad's rightful successors and relies on the Qurʾān and the "sound" books of Ḥadīths as primary sources of law. The Shafi'i school affirms the authority of both divine law-giving (the Qurʾān and the Sunnah) and human speculation regarding the Law. Where passages of Qurʾān and/or the Ḥadīths are ambiguous, the school seeks guidance of Qiyās (analogical reasoning). The Ijmā' (consensus of scholars or of the community) was "accepted but not stressed". The school rejected the dependence on local traditions as the source of legal precedent and rebuffed the Ahl al-Ra'y (personal opinion) and the Istiḥsān (juristic discretion).