How to calculate Shopify profit from your order export
Short answer
You can work out profit by product without an app. Export your orders (Orders → Export) and your products (which include a “Cost per item” column), match each order line to its product cost, and subtract.12 The orders export has no cost column, so the join is the key step.1 Then subtract fees, shipping and ads at the month level.
Step 1: Export your orders
In your Shopify admin, open Orders and click Export. Choose the orders to include (for example, orders by date), pick a CSV format and click Export orders. Large exports are emailed to you.1 You can delete customer name, email and address columns before you work with the file.
The columns you need: Name (order number), Created at, Financial Status, Lineitem name, Lineitem quantity, Lineitem price, Lineitem discount, Discount Amount, Refunded Amount, Shipping and Taxes.1 An order with several products has several rows.
Step 2: Get your product costs
Export your products. If you've filled in cost per item, it's in the Cost per item column.2 If you haven't, make a two-column list: product (or variant) name and what one unit costs you. Merchants have asked Shopify for years to add cost to the orders export, so this matching step is normal, not a sign you're doing it wrong.3
Step 3: Match costs to order lines
In a spreadsheet, add a column to the orders sheet that looks up each line item's cost from the products sheet (by SKU if you have them, otherwise by name and variant). Then:
- Line revenue = Lineitem price × Lineitem quantity − Lineitem discount
- Line cost = Cost per item × Lineitem quantity
- Line gross profit = line revenue − line cost
Add a pivot table by product: total units, revenue, cost and gross profit, then gross margin = gross profit ÷ revenue. Flag any product with no cost instead of leaving it blank, or it will look like 100% profit.
Step 4: Clean up the rows that distort profit
- Taxes: leave them out of revenue. Tax you collect isn't income.
- Test and cancelled orders: remove them. Check Financial Status and the Canceled at column.
- Refunds: the Refunded Amount column shows refunds per order; subtract them, and note which products came back.
- Order-level discounts: a discount code applied to the whole order appears in Discount Amount. Spread it across that order's lines by value, or you'll overstate profit on discounted orders. First check whether Discount Amount already includes the line-level discounts in your export, so you don't subtract them twice.
Step 5: Subtract the costs that aren't per product
Payment fees, shipping labels, ad spend, your plan and apps don't belong to one product. Total them per month and subtract them from the month's gross profit to get net profit. For fees, your payout transactions export shows a fee for every transaction.4 Ad spend is best kept by month and channel: ad platforms report the revenue they claim, but your orders export can't show which ad sold which product.
How long this takes
The first time, a few hours if your costs are complete. The slow parts are usually missing costs, renamed products and spreading discounts. The Shopify Profit Report is exactly this process done for you, with every total checked against your export and an Assumptions sheet listing every choice made.
Questions
Does the Shopify orders export include cost per item?
No. The orders export has prices, quantities, discounts, refunds, taxes and shipping, but no product cost. Cost per item is in the products export.
Can I calculate profit by product without an app?
Yes. Join your orders export to your products export (cost per item) in a spreadsheet, subtract cost from revenue for each line, and total by product.
How do I handle discount codes?
Line-level discounts are in Lineitem discount. Order-level discount codes appear in Discount Amount for the whole order; spread them across the order's lines by value.
What about refunds and partial refunds?
Use the Refunded Amount column and subtract refunds from the order's revenue. Decide whether to count them in the month of the order or the month of the refund, and stick to it.
Can I do this for the last 12 months?
Yes, as long as you have a cost for each product. Because you apply costs yourself, this works even for months when cost per item wasn't filled in Shopify.
Sources
- Shopify Help Center: Exporting orders
- Shopify Help Center: Using CSV files to import and export products
- Shopify Community: Can 'Cost Per Item' be added to the Orders Export file?
- Shopify Help Center: Viewing payout details
Checked October 18, 2026. If something has changed, email hello@groundworkmetrics.com and I'll fix it.