Anger in itself is not a sin in Islam. It is a human feeling, and the Prophet ﷺ felt it too. What counts is what your anger serves and what you do with it: he was rarely angry, never angry for himself, and even when he was angry he said only what was true.
We have chapter notes on Meeting Muhammad, and this guide draws on chapter 14, "When He Was Angry", and chapter 16, "When You Thought He Cursed You".
Is anger a sin in Islam?
The command is about control, not about never feeling it. A man asked the Prophet ﷺ for advice, and he said: "Do not get angry." The man asked again and again, and each time the answer was the same (Sahih al-Bukhari 6116). He also said: "The strong man is not the one who wrestles others down. The strong man is the one who controls himself when he is angry" (Sahih al-Bukhari 6114; Sahih Muslim 2609).
The Qur'an praises "those who restrain anger and who pardon people" (Al 'Imran 3:134), and believers who "when they are angry, they forgive" (ash-Shura 42:37). Neither says they never feel anger. See them in the Al 'Imran and ash-Shura mind maps.
Never for himself
'A'ishah said the Prophet ﷺ never took revenge for his own sake, only when something Allah had made sacred was violated, and then he acted for Allah (Sahih al-Bukhari 3560; Sahih Muslim 2327). So the first test of your anger is: is it for Allah, or for me?
What made the Prophet ﷺ angry
When Allah's limits were crossed. On a raid, Usamah ibn Zayd killed a man who had said "there is no god but Allah", thinking he said it only out of fear. The Prophet ﷺ asked: "Did you split open his heart to know whether it said it or not?" He kept repeating it until Usamah wished he had only become Muslim that day (Sahih Muslim 96).
When worship was twisted into extremes. Three men vowed to pray all night forever, fast every day, and never marry. He told them: "By Allah, I am the most fearful of Allah among you, yet I fast and break my fast, I pray and I sleep, and I marry women. Whoever turns away from my Sunnah is not of me" (Sahih al-Bukhari 5063).
When people were belittled. When Companions laughed at the thin shins of 'Abdullah ibn Mas'ud as the wind blew him about, he said those shins would weigh heavier in the Scale than Mount Uhud (Musnad Ahmad 3991, graded sahih li-ghayrihi by Shu'ayb al-Arna'ut). And when Abu Dharr insulted a man by his mother, he told him: "You are a man with jahiliyyah in you. Your servants are your brothers" (Sahih al-Bukhari 30). The book names the man as Bilal, as some commentators do; Ibn Baz held that the other wording of the report points to Abu Dharr's own servant. Either way, contempt for someone's origin angered him (see race, tribe and nation).
Self-control under provocation
The Prophet ﷺ often praised Khadijah, years after her death. Once 'A'ishah, out of jealousy, called her an old woman of Quraysh whom Allah had replaced with someone better (Sahih al-Bukhari 3821). In one report his face changed in a way 'A'ishah said she had only seen at revelation or a threatening cloud (Musnad Ahmad 25210, chain graded sahih by al-Arna'ut). In another, he answered by listing what Khadijah had done: she believed in him when people disbelieved, affirmed him when they called him a liar, supported him with her wealth when they withheld theirs, and bore him children (Musnad Ahmad 24864, graded sahih by al-Arna'ut; al-Haythami called its chain hasan).
Notice what he did not do. He did not insult 'A'ishah; he defended the one wronged and let the truth speak.
Turning a harsh word into a prayer
He knew a word can slip out in anger, so he made a covenant with his Lord: "I am only human. Any believer I have insulted, cursed or struck, make it purification, mercy and nearness to You on the Day of Resurrection" (Sahih Muslim 2601; a shorter wording, asking only that it bring the person near to Allah, is in Sahih al-Bukhari 6361).
Umm Sulaym's orphan girl. Surprised at how much she had grown, he said, "May you not grow older!" She ran home in tears. Umm Sulaym hurried to him, and he smiled and explained: "I am human. I am pleased as humans are pleased, and I get angry as humans get angry," and any such word against someone who did not deserve it becomes purification for them (Sahih Muslim 2603).
"May Allah cut your hand." A prisoner slipped away while 'A'ishah was distracted chatting with other women, and he said those words. He came back to find her turning her hands over, waiting to see which one would be cut. He raised his hands and made the same prayer: "O Allah, I am only human; I get angry as humans get angry," asking that any believer he had prayed against be purified by it (Musnad Ahmad 24259, chain graded sahih by al-Arna'ut).
If you have spoken harshly, repair it and pray for the person.
The Sunnah way to calm down
- Seek refuge in Allah. Two men were insulting each other, one red in the face. The Prophet ﷺ said: "I know a word that, if he said it, what he feels would leave him: a'udhu billahi minash-shaytanir-rajim", I seek refuge in Allah from the accursed Shaytan (Sahih al-Bukhari 3282; Sahih Muslim 2610).
- Change your position. "If one of you becomes angry while standing, let him sit down. If the anger leaves him, good; if not, let him lie down" (Sunan Abi Dawud 4782, graded sahih by al-Albani and Zubayr 'Ali Za'i).
- Ask for truthful speech in both states. Among the du'as 'Ammar ibn Yasir learned from the Prophet ﷺ: wa as'aluka kalimatal-haqqi fir-rida'i wal-ghadab, and I ask You for a word of truth whether content or angry (Sunan an-Nasa'i 1305, graded sahih by al-Albani; Zubayr 'Ali Za'i graded its chain hasan).
A note on wudu. A popular report says anger is from Shaytan, Shaytan is made of fire, and fire is put out with water, so make wudu when angry (Sunan Abi Dawud 4784). Al-Albani and Shu'ayb al-Arna'ut graded it weak, while Zubayr 'Ali Za'i called its chain hasan. Wudu is good in itself, but this report is not firm Sunnah.
See also du'as for every emotion, dhikr and du'as for when you feel angry, how to behave as a Muslim, the character of the Prophet ﷺ and his humility and manners. If someone's anger has hurt you, Hurt by Muslims is written for you.