Short answer
The sunnah gives clear steps: say A'udhu billahi min ash-shaytan ir-rajim, stay quiet, sit down if you are standing and lie down if needed. The Prophet ﷺ said the strong person is the one who controls himself when angry. Anger itself is not a sin; acting on it unjustly is.
Feeling anger is natural and not sinful. Acting on it with insults, harm or injustice is haram. Seeking refuge in Allah, keeping silent and changing your position are sunnah. Words of divorce, oaths and sales said in anger still count.
The four schools agree on this.
Explanation
A man asked the Prophet ﷺ for advice. He said: 'Do not get angry.' The man asked again and again, and each time he gave the same answer. He also said that the strong one is not the wrestler, but the one who controls himself when angry. The Quran praises those who restrain their anger and pardon people.
What to do in the moment:
- Seek refuge in Allah. Two men were arguing near the Prophet ﷺ, and one went red in the face. He said he knew a word that would take away what the man felt: A'udhu billahi min ash-shaytan ir-rajim.
- Change your position. He said that if you are angry while standing, sit; and if it does not go, lie down.
- Stay silent. Most damage from anger comes from the tongue.
- Leave the room until you calm down, and come back to the issue later.
- Make wudu if it helps you. A narration specifically about wudu for anger has a weak chain, but wudu is a good act that calms many people.
Some anger is right: anger when Allah's limits are broken, or when someone is wronged. The Prophet ﷺ became angry for Allah's sake, never for himself. Even then, he acted with justice.
Be careful: talaq said in anger usually counts, and so do oaths. See talaq in anger. For daily practice, the dua for anger page has the words with transliteration. The four schools agree on these teachings.
The evidence
Quran, Surah Aal-i-Imraan 3:134
ٱلَّذِينَ يُنفِقُونَ فِى ٱلسَّرَّآءِ وَٱلضَّرَّآءِ وَٱلْكَٰظِمِينَ ٱلْغَيْظَ وَٱلْعَافِينَ عَنِ ٱلنَّاسِ ۗ وَٱللَّهُ يُحِبُّ ٱلْمُحْسِنِينَ ﴿١٣٤﴾
Who spend [in the cause of Allah] during ease and hardship and who restrain anger and who pardon the people - and Allah loves the doers of good;
Allah praises those who hold back their anger.
Sahih al-Bukhari 6116
Sahih... قال لا تغضب فردد مرارا ...
"He said, 'Do not get angry', and repeated it several times."
Avoiding anger is a core piece of advice.
Sahih al-Bukhari 6114
Sahih... ليس الشديد بالصرعة إنما الشديد الذي يملك نفسه عند الغضب ...
"The strong one is not the one who wrestles others down; the strong one controls himself when angry."
Self-control in anger is true strength.
Sahih al-Bukhari 6115
Sahih... لو قال أعوذ بالله من الشيطان الرجيم ...
"If he said, 'I seek refuge in Allah from the accursed Shaytan'..."
Seeking refuge removes anger.
Sunan Abi Dawud 4782
Grading to be checked... إذا غضب أحدكم وهو قائم فليجلس ...
"If one of you becomes angry while standing, let him sit down."
Changing position is a sunnah remedy.
Where the ruling is recorded
- Ihya Ulum al-Din (al-Ghazali), Book on condemning anger, hatred and envy. Explains the causes and cures of anger.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Talaq. Divorce spoken in ordinary anger takes effect.
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.