I often see these used interchangeably.
Problem:
The phrase “all together” and the adverb “altogether” are not synonyms.
Explanation:
“Altogether” is an adverb that means completely, wholly, quite. For example: He’s not altogether certain about his mother’s sanity.
“All together” is a phrase that means in a group. For example: The dogs were all together in the kennel. This can be restated as All of the dogs were together in the kennel. And, without seriously affecting the meaning of the sentence, one can remove the “all”: The dogs were together in the kennel.
I believe that the mistaken use of “altogether” for “all together” — or vice-versa — in writing comes from the fact that “altogether” and “all together” sound alike.
Solution:
Use “all together” in a sentence when one can separate “all” and “together” in the sentence and still get the same meaning or when one can remove “all” without severly affecting the sentence’s meaning. Use “altogether” when one means completely, wholly, quite.