Image a company that earned 500,000 dollars last year.
Some guys are talking about that company in a bar.
That company earned half a million dollars last year.
Some news paper would also "half a million" when reporting that company.
What I'm trying to say is that, it seems that people use "half of a million" both in informal situation (casual talk) and formal situation(news report).
Cambridge Dictionary gives these examples
half a dozen
Roughly half (of) the class are Spanish and the others are a mixture of nationalities.
which seems to indicate that the "of" is unnecessary when "half" precedes a number.
However, Google Ngram shows that people might use "half of a million" sometimes.
the question is that, in what kind of situation, people use "half of a million". Could someone please give a hint? Thanks in advance.