Gross profit margin (Gross margin): formula and pricing guide
Gross profit margin shows the percentage of net sales revenue left over after paying the direct cost of the goods sold. Tracking this percentage across products and categories tells you how much each sale actually contributes toward covering overhead expenses and generating net profit.
Gross profit margin = ((Net Sales − Cost of Goods Sold) ÷ Net Sales) × 100. If you buy an item for 80 and sell it for 100 excluding tax, your gross profit is 20 and your gross profit margin is 20%.
The gross margin formula and its components
To calculate an accurate gross profit margin, both revenue and cost figures must exclude sales tax or VAT and reflect any line or document discounts granted to the customer. Even a small discount reduces the numerator directly and shrinks your margin percentage faster than many merchants expect.
Because purchase prices fluctuate across restocks, using weighted average cost rather than a single supplier invoice gives the clearest picture of real product profitability. The calculation relies on three core numbers:
- Net sales revenue: Total selling price minus line-item and invoice discounts, excluding tax
- Cost of goods sold (COGS): The weighted average purchase cost of the items sold during the period
- Gross profit margin (%): Gross profit divided by net sales revenue, multiplied by 100
Gross profit margin vs. markup percentage
Confusing gross margin with markup percentage is one of the most common pricing mistakes in retail and wholesale trade. Both formulas use the exact same gross profit amount in the numerator, but markup divides that profit by the purchase cost whereas gross margin divides it by the final selling price.
For example, buying a product at 80 and adding a 25% markup gives a selling price of 100. The 20 profit represents 20% of the 100 selling price, so a 25% markup equals a 20% gross margin. If you mistakenly think your margin is 25% and give a customer a 25% discount off 100, you sell the item for 75 and lose 5 on the sale.
Tracking gross margin in GiroPS
GiroPS automatically maintains the weighted average cost of stock-tracked items whenever you record purchase invoices. In the Sales Analysis report and Profit & Loss view, you can inspect net sales, cost of goods sold, and the resulting gross margin column for any date range.
When setting prices or testing promotional discounts, you can also use our free online `profit-margin-calculator` tool to convert between markup and margin instantly. If you work with staff, role permissions let you hide purchase prices and cost figures so employees can issue invoices without seeing your margins.
Practical scenario
Worked example: margin before and after a discount
A hardware store sells a power tool for 250 excluding tax, and its weighted average purchase cost is 160. Gross profit is 250 − 160 = 90, which gives a gross margin of (90 ÷ 250) × 100 = 36% (while markup on cost is 90 ÷ 160 = 56.25%). If the store offers a 10% promotional discount, the net selling price drops to 225, gross profit becomes 225 − 160 = 65, and the realized gross margin falls to (65 ÷ 225) × 100 = 28.89%.
Frequently Asked Questions
What is a healthy gross profit margin for a small business?
Healthy margins vary widely by industry and stock turnover speed. High-volume grocery or wholesale businesses often operate on tighter margins with fast turnover, whereas boutiques or specialty parts stores require higher margins to cover rent and payroll. Compare your current margin against your own past periods and fixed overhead requirements.
Can gross profit margin ever be negative?
Yes. Whenever the net selling price after discounts falls below the item's purchase cost, gross profit and gross margin turn negative. Businesses normally only accept a negative margin temporarily when clearing obsolete or dead stock to recover tied-up cash.
How do I calculate the selling price for a target gross margin?
Divide your purchase cost by (1 − target margin as a decimal). For instance, if an item costs 140 and you want a 30% gross profit margin, calculate 140 ÷ (1 − 0.30) = 140 ÷ 0.70 = 200 selling price.