Which sentence is more formal?
Most of the apartments in New York City's Upper West Side are extremely expensive. Most of the apartments in New York City's Upper West Side cost an arm and a leg.
Formal writing is used for essays, business letters, and reports. The following types of informal language should be avoided in formal writing:
Type | Examples
slang | cool, awesome
idioms | knock your socks off
conversational language | gonna, kinda, yeah
abbreviated language | ASAP, FYI
overly simple or imprecise language | he got some stuff at the store
contractions | can't, won't
Contractions are not as informal as the other types, but they should be used sparingly in formal writing.
Compare the following sentences. The first is informal. The second is formal.
Informal: Yeah, ostriches can't fly, but they're awesome runners.
Formal: Though ostriches are flightless, they are remarkably adept runners.

The first sentence is less formal. You can tell because it uses an idiom (cost an arm and a leg).
The second sentence uses formal language in place of the idiom, so it is more formal overall.