# Margin and markup calculator

Canonical interactive tool: https://taskpencil.com/tools/margin-markup-calculator/

Calculate gross profit, margin, markup, target selling prices, and the effect of discounts.

## Instructions

1. Enter your values in the labeled fields.

2. Results update automatically as inputs change. Review the result and assumptions.

3. Copy or print your result.

## Formula and example

Profit = selling price − cost. Margin = profit ÷ selling price × 100. Markup = profit ÷ cost × 100. Target price = cost ÷ (1 − target margin / 100). At cost 60 and price 100, profit is 40, margin is 40%, and markup is 66.6667%. A 10% discount reduces price to 90 and profit to 30.

## Limits

Use one currency. Amounts allow two decimal places and round to cents. Target margin must be below 100% with a positive cost. A zero selling price makes margin undefined; a zero cost makes markup undefined. Discount is 0–100%. Gross profit excludes taxes, fees, shipping, and overhead. All processing is local; inputs are not stored or transmitted.
