# Margin Calculator

Use the online margin calculator to find out the selling price, the cost or the margin percentage itself. Calculate any of the main variables in the sales process - cost of goods sold (how much you paid for the stuff that you sell), profit margin, revenue (how much you sell it for) and profit. In general, your profit margin determines how healthy your company is - with low margins you're dancing on thin ice and any change for the worse may result in big troubles. High margins mean there's a lot of room for errors and bad luck.

There are a few calculators that are similar in nature - please see margin with VAT (or sales tax), margin with a discount or a very similar markup calculator. You might find VAT calculator and sales tax calculator convenient, too.

## How to calculate profit margin

- find out your COGS (cost of goods sold). For example
`$30`

. - find our your revenue (how much you sell these goods for, for example
`$50`

). - calculate the gross profit by subtracting costs from revenue.
`$50 - $30 = $20`

- divide gross profit by revenue:
`$20 / $50 = 0.4`

. - express it as percentages:
`0.4 * 100 = 40%`

. - this is how you calculate profit margin... or simply use our gross margin calculator!

As you can see, margin is a simple percentage calculation, but in opposition to markup, it's based on revenue, not on Cost of Goods Sold (COGS).

## Gross margin formula

The formula for gross margin percentage is as follows: `gross_margin = 100 * profit / revenue`

(when expressed as a percentage). The profit equation is: `profit = revenue - costs`

, so an alternative margin formula is: `margin = 100 * (revenue - costs) / revenue`

.

Now that you know how to calculate profit margin, here's the formula for revenue: `revenue = 100 * profit / margin`

.

And finally, to calculate how much you can pay, given your margin and revenue (or profit), do: `costs = revenue - margin * revenue / 100`

## A note on terminology

All the terms (margin, profit margin, gross margin, gross profit margin) are a bit blurry and everyone uses them in a bit different context. For example, costs may or may not include expenses other than COGS - usually, they don't. I'll be using these terms interchangeably and forgive me if it's not in line with some definitions - what's important to us is what these terms mean to people and for this simple calculation the differences don't really matter. Luckily, it's likely that you know what you need and how to treat this data. This tool will work as gross margin calculator or a profit margin calculator.

So the difference is completely irrelevant for the purpose of our caluclations - it doesn't matter in this case if costs include marketing or transport. Most of the time people come here from Google after having searched for different keywords. In addition to those mentioned before, they searched for *profit calculator*, *profit margin formula*, *how to calculate profit*, *gross profit calculator* (or just *gp calculator*) and even *sales margin formula*.

## Margin vs markup

The difference between gross margin and markup is small but important. The former is a ratio of profit to the sale price and the latter is a ratio of profit to the purchase price (Cost of Goods Sold). In the common language, the profit is also called either markup or margin when we're dealing with raw numbers, not percentages. It's interesting how some people prefer to calculate the markup, while others things in terms of gross margin. To me, markup is more intuitive, but judging by the number of people who search for markup calculator and margin calculator, the latter is a few times more popular.