Profit Margin Calculator
Calculate gross profit, profit margin and markup from your cost and selling price. You can also work backwards from a target margin to find the selling price you need.
Calculate Profit Margin
Enter the cost of an item or service and its selling price. Use the same currency for both values.
Enter a cost and selling price to calculate profit, margin and markup.
Find a selling price from a target margin
Enter your cost and desired gross margin. The calculator will work backwards to find the selling price.
Profit Margin Formula
Profit margin measures how much of the selling price remains as gross profit after subtracting the cost entered into the calculator.
If an item costs $60 and sells for $100, gross profit is $40. The profit margin is:
This calculator uses the cost and selling price you provide. It does not automatically add taxes, payment fees, shipping, labor, overhead or other expenses.
Profit Margin vs Markup
Margin and markup both compare profit with another amount, but they use different denominators. That is why the percentages are usually different even when the cost, selling price and profit are identical.
Using a $60 cost and $100 selling price:
A 40% margin therefore does not mean a 40% markup. For dedicated markup calculations, use the Markup Calculator.
How to Calculate a Selling Price for a Target Margin
If you know your cost and the gross margin you want, you can rearrange the margin formula to calculate the required selling price.
Suppose your cost is $60 and you want a 40% margin:
A target margin must be below 100% when cost is greater than zero. As the target margin approaches 100%, the required selling price rises sharply.
Profit Margin Examples
| Cost | Selling Price | Profit | Margin | Markup |
|---|---|---|---|---|
| $50 | $75 | $25 | 33.33% | 50% |
| $60 | $100 | $40 | 40% | 66.67% |
| $75 | $100 | $25 | 25% | 33.33% |
| $80 | $100 | $20 | 20% | 25% |
| $100 | $100 | $0 | 0% | 0% |
| $120 | $100 | −$20 | −20% | −16.67% |
These examples assume the number entered as cost represents all costs you want included. If additional costs exist, include them in your cost figure before interpreting the result as the margin for that transaction.
What Happens When Selling Price Is Below Cost?
If the selling price is lower than the cost, the gross profit becomes negative. In this situation the calculator reports a loss and the profit-margin percentage is negative.
For example, if something costs $120 and sells for $100:
A negative margin indicates that the entered selling price does not cover the entered cost.
What Costs Should You Include?
The answer depends on what you are trying to measure. This calculator does not decide which expenses belong in your cost—it performs the mathematics using the cost figure you enter.
For a simple product calculation, your cost might include only the purchase or production cost. For a broader profitability analysis, you may also need to consider expenses such as:
- Shipping or freight.
- Packaging.
- Marketplace or payment-processing fees.
- Direct labor.
- Returns or wastage.
- Other costs relevant to the product or transaction.
This calculator compares the selling price with the cost value you enter. A business’s final net profit can also depend on operating expenses, salaries, rent, financing costs, taxes and other items not included here.
Currencies, Decimals and Rounding
The formulas are currency-independent. You can use AED, USD, EUR, GBP or another currency as long as the cost and selling price use the same currency.
The calculator displays monetary amounts to two decimal places and percentage results with practical decimal precision. Calculations are performed using the numerical values entered before the displayed result is rounded.
If you are reproducing an invoice, accounting report, marketplace statement or other business record, use the rounding and cost-allocation rules required by that system.
How to Use the Calculator
- Enter the cost of the product, service or transaction.
- Enter its selling price or revenue.
- Select Calculate, or simply edit the fields for a live result.
- Review gross profit, profit margin and markup separately.
- Use the target-margin section if you want to calculate a required selling price instead.
- Use the sample buttons to compare profitable, break-even and loss scenarios.
The calculation is designed to run with JavaScript in your browser and does not need to submit the entered numbers to a separate calculation service solely to perform the arithmetic.
Profit Margin Calculator FAQs
How do I calculate profit margin?
Subtract cost from selling price to find profit. Divide that profit by the selling price and multiply by 100.
What is the difference between profit margin and markup?
Profit margin divides profit by selling price, while markup divides profit by cost. Because they use different starting values, their percentages are usually different.
What is the profit margin if something costs $60 and sells for $100?
Profit is $40. Dividing $40 by the $100 selling price gives a 40% profit margin.
What is the markup if something costs $60 and sells for $100?
Profit is $40. Dividing $40 by the $60 cost gives a markup of approximately 66.67%.
How do I calculate selling price from a target margin?
Divide the cost by one minus the target margin expressed as a decimal. For example, a $60 cost with a 40% target margin requires a $100 selling price.
Can profit margin be negative?
Yes. If the selling price is below the entered cost, profit is negative and the calculated margin is negative.
What happens when cost is zero?
Profit can still be calculated as selling price minus zero, and margin can be calculated when selling price is greater than zero. Markup is undefined because the markup formula would require division by zero.
Is gross margin the same as net profit margin?
Not necessarily. This calculator measures margin using the cost figure you enter. Net profit calculations may include additional operating, financing, tax and other expenses.
Can I use AED or another currency?
Yes. The formulas work with any currency as long as cost and selling price are expressed in the same currency.
Does the calculator include tax, shipping or payment fees?
Not automatically. Include any expenses you want considered in the cost value before calculating the margin.
