Gross profit
$40.00
Selling price − cost
$100 − $60 = $40
Free business tool
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.
Example result
Gross margin
40.00%
On a $100.00 sale with $60.00 in cost.
Example only. Select Calculate margin to use the current inputs.
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.
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
Selling price − cost
$100 − $60 = $40
Gross margin
Gross profit ÷ price × 100
$40 ÷ $100 × 100 = 40%
Markup on cost
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
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.
From an estimate to your books
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.
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 costsReports → 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 valuationOpen 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 statementsPlan 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
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.
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.
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.
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.
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.
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.
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.