The exclamation point is used to signal strong emotion. It appears after an exclamatory word, phrase, or sentence.
The exclamation point is increasingly rare in formal writing and is not overly used by most professional fiction writers, though it is often used in informal contexts, such as text messages and social media posts.
Examples
Don’t go in there!
Martha came running through the door shouting, “Get out! All of you get out!”
“I don’t care!” Ron screamed.
I sat here and cried for you!
Bryan A. Garner, in The Chicago Guide to Grammar, Usage, and Punctuation, recommends avoiding the exclamation point to indicate your own amazement or surprise.
Not: Suddenly the rain fell and the frazzled party began to disperse!
But: Suddenly the rain fell and the frazzled party began to disperse.
Writers sometimes wonder whether it is okay to use an exclamation point in addition to a question mark for exclamatory questions. Though you may see it in informal writing, most experts recommend using one or the other.
Not: How many pizza slices did you eat!?
But: How many pizza slices did you eat!
Or: How many pizza slices did you eat?