Canonical page: https://bokeping.com/resources/tools/profit-margin-calculator/

Markdown page: https://bokeping.com/resources/tools/profit-margin-calculator.md

Text version of the public page. Check the canonical page for current terms and interactive features.

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 [Bokeping Team](<https://bokeping.com/about/#content-team>)Updated October 10, 2026

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](<https://bokeping.com/resources/learn/13-week-cash-flow-forecast-template/>) 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](<https://bokeping.com/help/products-inventory/inventory-costing/>)
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](<https://bokeping.com/help/reports/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](<https://bokeping.com/help/reports/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](<https://bokeping.com/pricing/>).

[Start with Bokeping](<https://app.bokeping.com/auth/signup>) [Explore inventory & COGS](<https://bokeping.com/products/inventory/>)

FAQs

## Profit margin questions

### How do I calculate profit margin?

Subtract the item’s cost from its selling price to get gross profit. Divide gross profit by selling price and multiply by 100. A $100 sale with $60 in cost has $40 gross profit and a 40% gross margin. Use revenue after discounts and exclude sales tax collected.

### What is the difference between margin and markup?

Margin divides gross profit by selling price. Markup divides the same profit by cost. With a $60 cost and a $100 sale, margin is 40% and markup is 66.67%. Adding a 40% markup to cost does not produce a 40% margin.

### How do I find a selling price for a target margin?

Divide cost by 1 minus the target margin as a decimal. For a $60 cost and a 40% target, use $60 ÷ (1 − 0.40) = $100. This calculator rounds a suggested price up to the next cent so it meets at least the target, and shows the actual margin at that rounded price. The target must be between 0% and 99.99%, with cost above zero.

### What is a good profit margin?

There is no single margin that is right for every business. Compare the same type of margin across comparable products or periods, then check whether the gross profit covers your operating expenses. Industry, product mix, returns, fulfillment costs, and the accounting basis all affect the comparison. This calculator does not apply an industry benchmark.

### Does this calculator show net profit margin?

No. This tool estimates gross margin from selling price and item cost. Net profit margin uses net income after all recognized expenses, divided by net revenue. Use the same date range and accounting basis when reviewing income, cost of goods sold, operating expenses, and net income in a Profit and Loss report.

### What happens when cost or selling price is zero?

At zero cost and a positive selling price, gross margin is 100% but markup is undefined because it divides by zero. At a zero selling price, gross margin is undefined; the tool still shows the gross profit or loss. Target-price mode requires a positive cost. A selling price below cost produces a negative margin.

### Does the calculator connect to my Bokeping account?

No. It runs on this page without a login and does not read your company records or save a price to Bokeping. Use it to check a pricing assumption, then review the actual cost and sales records in your account. Inventory tracking and cost of goods sold are included in Standard and Pro; multiple stores, warehouses, and stock transfers require Pro.
