Calyx

Margin Calculator

Gross margin, net margin, and markup from cost and selling price.

Runs in your browser. Your data stays on your device.

Input

Result

Gross margin€35.00
Margin rate43.75%
Markup77.78%
Cost ratio56.25%

What is gross margin?

Gross margin is the revenue remaining after subtracting the direct cost of goods sold (COGS). It represents the capital available to cover operating expenses, debt, taxes, and profit. Gross margin is the most fundamental profitability metric — if your gross margin is negative, no amount of operational efficiency will make the business viable.

Formulas

This calculator computes four related metrics from two inputs (cost and selling price):

Gross margin = Selling price − Cost

Margin rate (%) = (Gross margin ÷ Selling price) × 100

Markup (%) = (Gross margin ÷ Cost) × 100

Cost ratio (%) = (Cost ÷ Selling price) × 100

The margin rate and cost ratio are complementary — they always sum to 100%. If your margin rate is 60%, your cost ratio is 40%.

Margin vs. Markup

Margin and markup are the most frequently confused financial metrics. Margin is expressed as a percentage of the selling price. Markup is expressed as a percentage of the cost. Consider a product purchased at €40 and sold at €100: the gross margin is €60, the margin rate is 60%, but the markup is 150%. The same transaction, two very different percentages. When discussing pricing with suppliers, manufacturers, or retail partners, always clarify which metric is being referenced — misalignment here is a common source of pricing errors.

What is a good gross margin?

Gross margin benchmarks vary significantly by industry. SaaS companies typically operate at 70–90% gross margins because the marginal cost of serving an additional user is near zero. E-commerce businesses range from 20–50%, depending on whether they manufacture or resell. Traditional retail sits at 25–35%. Professional services firms average 50–70%, with the primary cost being labor. These are gross margins — net margins (after operating expenses, taxes, and interest) will be substantially lower.

Edge cases

When selling price equals cost, both margin and markup are zero — you are breaking even on direct costs. When selling below cost, margin becomes negative, which may be intentional (loss leaders, market penetration pricing) or a signal of pricing dysfunction. When cost is zero — common with digital goods, open-source-based products, or content — the margin rate is 100% and markup is mathematically infinite. In practice, even digital products have marginal costs (hosting, bandwidth, payment processing) that should be factored into a more realistic COGS figure.

When to use this calculator

Use this calculator when setting prices for new products or services, evaluating whether a supplier quote preserves your target margin, comparing profitability across product lines, preparing financial projections for investors, or benchmarking your margins against industry standards. The cost ratio metric is particularly useful for procurement teams evaluating input cost changes — a 5% increase in cost ratio directly translates to a 5% decrease in margin rate.