Skip to content

Free business tool

Profit margin calculator

Turn cost and selling price into gross profit, margin, and markup. Or work backward from your target margin to a selling price you can use.

By Updated
What would you like to calculate?

Enter your cost and selling price to see gross profit, margin, and markup.

Use the cost of the item you are selling, before operating expenses.

Use the amount after discounts, excluding sales tax collected.

No signup needed. Your numbers stay in this calculator and do not update your Bokeping account.

Example result

Gross margin

40.00%

On a $100.00 sale with $60.00 in cost.

Gross profit
$40.00
Markup on cost
66.67%
Selling price
$100.00

Example only. Select Calculate margin to use the current inputs.

Gross profit is not take-home profit.

Rent, payroll, marketing, financing costs, and other expenses still affect your net profit.

Keep the inputs comparable: this tool uses one item, USD, and amounts with up to two decimals. Enter both cost and selling price on the same basis. Use a selling price after discounts and before sales tax collected; include the costs allocated to that item under your accounting policy. Amount inputs are limited to $999,999,999.99.

The same profit. A different denominator.

Profit margin vs. markup

Imagine buying an item for $60 and selling it for $100. The $40 gross profit is 40% of your selling price, but 66.67% of your cost. That is why margin and markup cannot be used interchangeably.

Gross profit

$40.00

Selling price − cost

$100 − $60 = $40

Gross margin

40.00%

Gross profit ÷ price × 100

$40 ÷ $100 × 100 = 40%

Markup on cost

66.67%

Gross profit ÷ cost × 100

$40 ÷ $60 × 100 ≈ 66.67%

For comparison, a 40% markup on $60 produces an $84 selling price and a 28.57% margin. To reach a 40% margin, divide $60 by 0.60 instead: the selling price is $100.

Price for a target

Find a selling price from your target margin

Choose Selling price in the calculator. Enter your cost and the percentage of revenue you want left as gross profit. The formula is cost ÷ (1 − target margin ÷ 100).

For a $10 item and a 30% target, the exact price is approximately $14.285714. The tool rounds up to $14.29, producing a displayed margin of 30.02%. Rounding down to $14.28 would miss the target.

A pricing target is a starting point

  • Use the realized selling price. A discount or return can change the margin you actually earn.
  • Review the cost behind the number. A purchase price, an inventory carrying cost, and the cost recognized on a sale can differ.
  • Check operating expenses separately. A positive gross margin does not prove that the whole business is profitable.
  • Review cash timing. A profitable invoice may still be unpaid. Use a 13-week cash flow forecast to plan when cash comes in and goes out.

From an estimate to your books

Check the actual costs and profit in Bokeping

The calculator checks one pricing assumption. Bokeping keeps the purchase, inventory, sale, and accounting records you need to review what happened. It does not automatically copy these inputs into your account.

  1. 1. Check how stock is costed

    In Settings → Products & Services, review the inventory valuation method and cost scope. Bokeping supports FIFO and moving weighted average. A displayed average cost does not mean that every FIFO sale uses that amount.

    Understand inventory costs
  2. 2. Separate stock value from COGS

    Reports → Inventory Valuation shows the stock carried at a cutoff date. Cost of goods sold is the cost recognized for stock sold. Check item movements and source records when either amount looks wrong; changing a selling price does not correct inventory cost.

    Review inventory valuation
  3. 3. Review the Profit and Loss

    Open Reports → Profit and Loss. Select the company, dates, and Cash or Accrual basis. Read income, COGS, operating expenses, and net income together. Follow a linked account amount to the General Ledger when you need the supporting detail.

    Read financial statements

Plan scope: inventory tracking and cost of goods sold are included in Standard and Pro. Multiple stores, warehouses, and stock transfers require Pro. Compare the plans.

FAQs

Profit margin questions