The net profit margin of a company is calculated by dividing net profit by total revenue.
Net profit margin = Net profit / Total revenue.