The CPM formula
CPM stands for cost per mille, mille being Latin for thousand. The formula is CPM = (total cost / impressions) x 1,000. If you spend 500 dollars and your ad is shown 125,000 times, CPM = (500 / 125,000) x 1,000 = 4, so your CPM is 4 dollars per thousand impressions. To work backward, impressions = (cost / CPM) x 1,000, and cost = (CPM x impressions) / 1,000.