ToolSphere

Profit Margin Calculator

Business and money

Calculate ecommerce profit, gross margin, markup percentage and target selling price with optional shipping, payment processing fees and product costs.

Calculate ecommerce profit, profit margin, markup percentage, and target selling price for online orders. All amounts in USD.

Estimated profit per order

$25.25

50.5% margin · 102.0% markup on total cost

Price needed for 40.0% margin: $35.81 (leaves $16.33 profit)

After product costs, shipping, and estimated payment fees. Before income tax.

The retail price charged to the buyer before shipping.

Your unit manufacturing, wholesale, or materials cost.

Amount billed to customer for shipping. Enter 0 for free shipping.

Your actual postage, courier, or fulfillment label cost.

Packaging box, tape, inserts, or allocated ad spend (CAC).

Choose a common ecommerce plan rate or customize the fee fields below.

Percentage charged on the total transaction amount (e.g. 2.9% on Shopify Basic).

Fixed payment gateway fee per order (e.g. $0.30 for Shopify Payments).

Desired net profit margin percentage (0 to 99.99%). Used to calculate the required selling price.

Where the money goes

Product selling price
$45.00
Shipping charged to customer
$5.00
Total order revenue
$50.00
Cost of goods sold (COGS)
$15.00
Shipping cost you pay
$6.00
Other order costs (packaging, CAC)
$2.00
Payment processing fee (2.9% + $0.30)
$1.75
Total costs per order
$24.75
Estimated net profit / loss
$25.25
Net profit margin
50.5%
Markup on total cost
102.0%
Gross product profit
$30.00
Gross margin (product only)
66.7%
Gross markup (product only)
200.0%
Target selling price (40.0% margin)
$35.81

Calculations assume US dollar transactions and standard US payment gateway fee structures. Does not include monthly ecommerce platform subscriptions (e.g., Shopify monthly plan), app fees, refund chargebacks, currency conversion, or federal/state income taxes.

Fee benchmarks checked on . Sources: Shopify pricing and Stripe pricing. Verify your store’s active payment processor contract before finalizing retail pricing.

On this browser only

Give feedback

Did this tool help?

Tell us what worked, what didn’t, or what you’d like next.

Opens Google Forms in a new tab with this tool’s name filled in. No sign-in or email required. Feedback is optional.

How to use Profit Margin Calculator

  1. 1Enter your product retail price and cost of goods sold (COGS) in USD.
  2. 2Add optional shipping charged to the customer and your actual shipping postage cost.
  3. 3Include other order costs like packaging or ad spend (CAC), and select or customize payment gateway fees.
  4. 4Set a target profit margin percentage to calculate the minimum selling price required.
  5. 5Review net profit, profit margin, markup on cost, and the comprehensive order breakdown.

About Profit Margin Calculator

Know what you keep from every online order

In ecommerce, high sales volume can conceal thin margins or quiet losses. A store generating 50,000 USD a month in top-line revenue can still face cash-flow shortages if transaction fees, shipping postage, packaging supplies, and ad costs erode the spread. This ecommerce profit margin and markup calculator gives Shopify merchants, online sellers, and direct-to-consumer brands an instant view of unit economics. The loaded example shows the economics of a typical retail order; replace its values with your own product numbers to analyze any pricing structure.

The calculations are designed for sellers operating in US dollars with US payment processors. The tool evaluates one unit or one order, determining net profit, profit margin percentage, markup on total cost, gross product margin, and the exact selling price needed to achieve a target profit margin. It is an operational planning tool before federal and state income taxes.

Margin vs. markup: why the difference matters

Confusing margin and markup is one of the most common pricing mistakes in retail. While both metrics measure profitability, their mathematical denominators differ:

  • Profit margin is profit expressed as a percentage of revenue: Profit Margin % = (Net Profit ÷ Total Revenue) × 100. Because profit is a share of total revenue, margin can never reach or exceed 100% in a viable business.
  • Markup is profit expressed as a percentage of cost: Markup % = (Net Profit ÷ Total Costs) × 100. Markup can easily exceed 100% whenever an item sells for more than double its total cost.

If you purchase inventory for 50.00 USD and apply a 50% markup, you set the price at 75.00 USD. Your gross profit is 25.00 USD. However, your profit margin on that sale is 33.3% (25.00 USD ÷ 75.00 USD), not 50%. Confusing the two metrics often leads store owners to underprice products, believing their margin is wider than it really is.

Accounting for shipping and payment processing fees

A complete pricing calculation must account for friction costs inherent in modern ecommerce. This calculator separates revenue streams from expense items:

  1. Shipping charged vs. shipping paid: Shipping collected from the buyer is top-line revenue, whereas the postage label you purchase from USPS, UPS, or FedEx is an operating expense. Even if you charge 5.00 USD and pay 5.00 USD for the label, the transaction is not cost-neutral because payment processors levy their percentage fee against the customer's total order charge, including shipping.
  2. Payment processor fees: Services like Shopify Payments, Stripe, and PayPal charge a combination of a percentage rate and a fixed fee (such as 2.9% + 0.30 USD on Shopify Basic). The percentage fee applies to gross transaction revenue (retail price plus shipping charged).
  3. Other order expenses: Packaging materials (custom mailers, corrugated boxes, tape, inserts) and allocated advertising spend (CAC) must be subtracted to measure true unit profitability.

Worked example: pricing a Shopify product

The numbers in this breakdown are computed directly by this calculator's verified library. Consider an online store selling an item priced at 45.00 USD, charging 5.00 USD shipping to a US buyer. The unit cost of goods sold (COGS) is 15.00 USD, actual shipping postage costs 6.00 USD, packaging and ad allocation total 2.00 USD, and the store uses Shopify Basic processing (2.9% + 0.30 USD).

Order component Amount (USD) Notes
Product selling price 45.00 Retail price charged before shipping
Shipping charged to buyer 5.00 Customer shipping fee collected
Total order revenue 50.00 Gross order charge
Cost of goods sold (COGS) 15.00 Wholesale or manufacturing cost
Shipping postage paid 6.00 Carrier shipping label cost
Packaging and ad costs 2.00 Mailer box, inserts, and per-item CAC
Payment processing fee 1.75 2.9% of 50.00 USD (1.45 USD) + 0.30 USD
Total costs per order 24.75 Sum of inventory, shipping, fees, and packaging
Estimated net profit 25.25 Total revenue − total costs

On this order, the store achieves a 50.5% profit margin and a 102.0% markup on total cost. When analyzing the product alone before fulfillment costs, gross profit is 30.00 USD (45.00 USD − 15.00 USD), representing a 66.7% gross margin and a 200.0% gross markup.

Solving for target price: pricing for a required margin

Rather than guessing retail prices and checking the resulting margin through trial and error, this calculator mathematically inverts the equation to solve for the exact price required to achieve your target margin.

Let base costs equal COGS + shipping cost + other costs + fixed fee. For this example, base costs are 15.00 + 6.00 + 2.00 + 0.30 = 23.30 USD. If your goal is a 40% net margin with a 2.9% payment fee, the remaining revenue share is 1 − 0.029 − 0.40 = 0.571 (57.1%). The total revenue needed is 23.30 USD ÷ 0.571 = 40.81 USD. Subtracting the 5.00 USD shipping charged leaves a required selling price of 35.81 USD. At 35.81 USD, your profit is 16.33 USD, achieving the targeted 40.0% net margin.

The impact of offering free shipping

Free shipping is a proven conversion driver, but absorbing fulfillment costs alters order economics. In the loaded example, if the merchant offers free shipping (charging 0.00 USD while continuing to pay 6.00 USD postage), total revenue drops to 45.00 USD. The processing fee adjusts to 1.61 USD (2.9% of 45.00 USD + 0.30 USD), bringing total expenses to 24.61 USD. Net profit falls from 25.25 USD to 20.39 USD, reducing the profit margin to 45.3%. Store owners can use this comparison to determine whether the conversion lift from free shipping compensates for the 4.86 USD reduction in profit per unit.

Limitations and business planning assumptions

This calculator evaluates single-order unit economics prior to income tax. It excludes monthly overhead such as Shopify plan subscriptions (39 USD/month), third-party app subscriptions, email marketing software, warehouse storage fees, and returns. If your business experiences an 8% return rate, build that allowance into the Other costs field. Combine this analysis with the break-even calculator to determine the sales volume required to cover fixed monthly overhead, and consult the percentage calculator for general mathematical checks.

Guides and tutorials

Frequently asked questions

What is the difference between profit margin and markup?

Profit margin measures profit as a percentage of selling price (revenue), while markup measures profit as a percentage of cost. For example, an item bought for $20 and sold for $40 has a 100% markup on cost, but a 50% profit margin on revenue.

How do I calculate profit margin for an online store?

Subtract all order expenses—including cost of goods, carrier postage, packaging, and payment processing fees—from the total amount charged to the customer. Divide the remaining net profit by total revenue and multiply by 100 to get your profit margin percentage.

What is a healthy profit margin for Shopify and ecommerce?

For direct-to-consumer ecommerce stores, a healthy net margin typically ranges from 20% to 40% after all product, fulfillment, and ad costs. Gross margins on manufactured goods often range between 50% and 75% before shipping and marketing expenses.

How do payment processing fees affect my margin?

Credit card processors like Shopify Payments and Stripe take a percentage (typically 2.5% to 2.9%) plus a fixed fee (typically $0.30) from the entire transaction value, including shipping charged to the customer. This percentage fee reduces margin on every dollar of revenue.

How do I account for free shipping in my retail pricing?

When offering free shipping, your shipping revenue is $0, but you still pay the carrier postage. To maintain target profit, incorporate your average carrier cost directly into the item's retail price using the target margin formula.

What is the formula to calculate the selling price for a target margin?

The formula is: Target Price = (Total Base Costs ÷ (1 − Fee Rate − Target Margin)) − Shipping Charged. For instance, covering $23.30 in base expenses with a 2.9% fee and 40% target margin requires $40.81 in total revenue, or a $35.81 price if charging $5 for shipping.

What is the difference between gross margin and net margin?

Gross margin evaluates the product in isolation, subtracting only the direct cost of goods (COGS) from the selling price. Net order margin subtracts all delivery expenses, packaging, platform fees, and marketing allowances to reflect what actually remains in your bank account.

Why can profit margin never reach or exceed 100%?

Profit margin is profit divided by revenue. Because your costs are positive numbers, profit is always smaller than revenue, keeping margin under 100%. Markup, by contrast, divides profit by cost, so markup can easily exceed 100% or 200% whenever an item sells for more than double its cost.

Should I include customer acquisition cost (CAC) in this calculator?

Yes. Entering your estimated per-order advertising spend under Other costs provides a realistic view of contribution margin. If ad spend exceeds net margin per unit, the order loses money regardless of healthy product gross margins.

Does this calculator include income taxes or sales tax?

No. This calculator provides pre-income-tax operating estimates. In the US, sales tax collected from buyers is remitted directly to state tax authorities (or automatically collected by marketplace facilitator laws) and is not merchant revenue.

Have a suggestion for Profit Margin Calculator?Share your feedback ↗