How is Gross Margin calculated?

Gross Margin is calculated by subtracting the cost of goods sold from the revenue (Net Revenue) and dividing the result by the revenue minus discounts (Net Sales).