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.
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.