Gross margin is revenue minus cost of sales; as a percentage, it is that gross profit divided by revenue.
Gross margin % = (revenue − cost of sales) ÷ revenue
It shows how much of each sales dollar is left to pay for operating expenses such as research, selling and administration. Some companies, Apple among them, label the dollar amount "gross margin" rather than "gross profit".
Retailers run thin gross margins on high volume; software companies run high ones.
Practise it: Margin stack: gross, operating and net margin.