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:
- 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.
- 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).
- 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.