Gross margin, or gross profit margin, is the difference between revenue and cost of goods sold (COGS), divided by revenue. Gross margin is expressed as a percentage. Generally, it is calculated as the selling price of an item, less the cost of goods sold (e.g., production or acquisition costs, not including indirect fixed costs like office expenses, rent, or administrative costs), then divided by the same selling price. "Gross margin" is often used interchangeably with "gross profit", however, the terms are different: "gross profit" is technically an absolute monetary amount, and "gross margin" is technically a percentage or ratio.
Gross margin is a kind of profit margin, specifically a form of profit divided by net revenue, e.g., gross (profit) margin, operating (profit) margin, net (profit) margin, etc.