Explore Dika Ops

Profit margin and markup calculator

Enter any two of cost, selling price, margin percent and markup percent, and the calculator fills in the other two. Paste a list to price many products at once.

Free Runs in your browser No sign-up

Fill in any two values. The tool calculates the other two.

%
%
Units sold. Used for the totals.

How to calculate profit margin and markup

Margin and markup both describe profit, but against different bases. Enter any two values and the tool completes the set and shows each formula with your numbers.

  1. Choose a currency Pick the currency of your cost and price so that the amounts are formatted correctly.
  2. Enter two values Fill in any two of cost, price, margin and markup. The two fields you edited last are the ones the tool trusts.
  3. Read the other two The remaining fields are calculated and shown in a tinted style, so you can tell typed values from results.
  4. Add a quantity Enter how many units you sell to see the total profit and the total revenue.
  5. Follow the steps Open the working to see each formula with your own numbers, which makes the result easy to check and to explain.
  6. Switch to bulk mode Paste one product per line as name, cost, price and optional quantity to get a table with margin and markup for each and a total row.

Tips for pricing with margin

  • Decide whether your target is a margin or a markup before you compare prices, and say which one you mean in every discussion.
  • Start from the margin you need and work out the price, rather than adding a percentage to cost by habit.
  • Include every cost that belongs to the product, such as packaging, shipping and payment fees, before you calculate.
  • Check the margin after a discount, because a discount comes out of the price, not out of the cost.
  • Use bulk mode to find the products that fall below your target margin.

Common margin and markup mistakes

  • Mixing up margin and markup A 25 percent markup is a 20 percent margin. Quoting one as the other changes the price by a noticeable amount.
  • Adding the margin percentage to cost To reach a 40 percent margin the price is cost divided by 0.6, not cost multiplied by 1.4.
  • Leaving out costs A margin calculated on the purchase price alone overstates profit when freight, fees and returns are real costs.
  • Forgetting that tax is not revenue Calculate margin on prices without VAT or sales tax, because that tax is passed on to the authority.

Open it pre-filled with a link

Every field accepts a query parameter with the same name, so a link, a script or an AI agent can fill the tool in and run it. Open an example: /tools/profit-margin-calculator/?cost=60&price=100

ParameterValuesWhat it does
modesingle · bulk (default: single)single for one product, bulk for a list.
costnumberCost per unit.
pricenumberSelling price per unit, without tax.
marginnumberMargin in percent of the price.
markupnumberMarkup in percent of the cost.
qtynumber (default: 1)Units sold, for total profit and revenue.
currencyEUR · USD · GBP · TRY · CHF · CAD · AUD · SEK · PLN (default: EUR)Currency as a three-letter code.
bulktextOne product per line as NAME;COST;PRICE[;QTY]. Separate columns with a tab, semicolon or vertical bar.

Have a project in mind? Let us talk it through.

Tell us what you want to build or improve. We reply with a clear next step.