On the whole has 2 different meanings across 2 categories:
Adverb · Prep_phrase
with everything considered (and neglecting details)
"altogether, I'm sorry it happened"
"all in all, it's not so bad"
For the most part; apart from some insignificant details.