Shopify builds Total Sales by stacking six components: Gross Sales minus Discounts minus Returns, plus Shipping, Taxes, Duties, and Fees. Gross Sales is price times quantity. The result is what customers paid in total for the selected period, before Shopify fees, payment processing, and cost of goods.

If you want to defend that number to your accountant, match it to the API, or spot which orders moved the figure in a given month, you also need to see the orders, refunds, and line items underneath it. This article walks through the formula, works a fresh example, and sets up a reusable Data Export report that reconstructs Total Sales from the order level up.

What goes into Shopify Total Sales?

Shopify stacks six components in a fixed order.

  • Gross Sales: product price multiplied by quantity ordered, at the line-item level, before any discount.

  • Discounts: automatic and code-based discounts applied at checkout, posted as a negative.

  • Returns: the value of refunded items, posted as a negative on the refund date, not the order date.

  • Shipping: the shipping fee the customer paid at checkout.

  • Taxes: sales tax collected from the customer.

  • Duties: import duties collected at checkout on cross-border orders.

  • Fees: additional charges the customer paid, such as tips or configured surcharges.

The order matters. Shopify first computes Net Sales (Gross Sales minus Discounts minus Returns), then adds the pass-through amounts the customer paid on top. Those pass-through amounts are real money the store received, but most of it is owed somewhere else: tax authorities, carriers, and customs.

What is the exact Total Sales formula?

Total Sales = Gross Sales − Discounts − Returns + Shipping + Taxes + Duties + Fees

This is the same formula Shopify uses in the admin, the Total Sales Over Time report, and the ShopifyQL sales dataset. Some Shopify documentation pages group duties and fees into "additional fees," but the components are the same.

How does the formula work on a real order?

Take an order with three line items, a discount code applied at checkout, one unit refunded the next day, flat-rate shipping, state sales tax, import duties, and a small checkout surcharge.

Component Calculation Value
Gross Sales 3 units x $80.00 $240.00
Discounts 10% off code −$24.00
Returns 1 unit refunded next day −$80.00
Shipping Flat shipping paid by customer +$9.95
Taxes State sales tax +$12.60
Duties Import duties collected +$4.00
Fees Checkout surcharge +$1.50
Total Sales $164.05

The $164.05 is what the Total Sales card and the Total Sales Over Time report will show for this order once the refund posts. It is not what hit your bank. Payment processing, Shopify platform fees, the shipping label you paid the carrier, duties remitted to customs, and cost of goods still come out.

The figures above are illustrative. Swap in your own numbers to reconcile against a real order.

Where does Shopify show Total Sales?

Two places. The Analytics Overview shows a Total Sales card for the selected period. Analytics > Reports > Sales > Total Sales Over Time shows the trend across days, weeks, or months. Both pull from the same underlying ladder, so the headline card and the report should always agree for the same date range.

Why does your Total Sales figure differ from payouts, the API, and accounting?

Each system counts a slightly different thing, and each is answering a different question.

  • Payouts: show what Shopify Payments deposited after processing fees, refunds, and chargebacks. Payouts settle on a lag, so a sale on Monday may land in Wednesday's payout.

  • The API: returns order-level fields like total_price, subtotal_price, and current_total_price. Rolling these up by hand rarely matches the admin figure because refunds use separate objects with their own dates, and the admin recognizes returns on the refund date, not the order date.

  • Accounting software: usually records revenue net of tax and shipping, often on an invoice date rather than an order date, depending on how the connector is configured.

None of these is wrong. Total Sales is the revenue ladder. Payouts are cash movement. Accounting is recognized revenue. Rebuilding Total Sales from order data is the fastest way to see where the gap comes from.

How do you rebuild Total Sales in Data Export?

Build a custom order report with the fields Shopify uses to compose Total Sales. These are the fields that materially matter, grouped by their role in the ladder.

Date and grouping

  • Order Processed At, for sales recognition date.

  • Refund Processed At, for returns.

  • Group by day, week, or month, matching your admin view.

Line-item basis for Gross Sales

  • Line Item Price multiplied by Line Item Quantity. Use line items, not order subtotals, so discounts and refunds net correctly.

Adjustments

  • Line Item Discount.

  • Order Discount.

  • Refund Line Item Subtotal.

  • Refund Adjustments.

Pass-through amounts the customer paid

  • Shipping Price.

  • Total Tax.

  • Duties.

  • Tip and any additional fee fields configured on the store.

Filters

  • Exclude test orders.

  • Exclude cancelled unpaid orders if your admin excludes them.

  • Set the date range to match the admin's view exactly, including the time zone.

Schedule the report to deliver to the finance inbox or a Google Sheet on the cadence you reconcile. The output ties each total back to the orders that built it, so when next month's figure moves, you can isolate the day, channel, or SKU behind the shift.

Data Export reports on Shopify data from the single store it is installed on. If you charge in multiple currencies, pick one presentment basis (shop currency or order currency) and keep it consistent across the report.

Total Sales vs Net Sales vs Gross Sales: which do you use when?

Metric What it is Use it for
Gross Sales Price x quantity, before any adjustment Demand and product-level volume
Net Sales Gross Sales minus Discounts minus Returns Product revenue after promotions and returns
Total Sales Net Sales plus Shipping, Taxes, Duties, Fees Top-line revenue, dashboard headlines, tax base checks

Report revenue growth on Net Sales. Report headline revenue on Total Sales. Never quote Total Sales as profit. It is everything the customer paid, not what the business kept.

Frequently Asked Questions

Which Shopify Total Sales number is the "correct" one: admin, API, or ShopifyQL?

The admin and ShopifyQL use the same definition and should match for finalized data. The REST and GraphQL APIs expose order-level fields that you have to roll up yourself, and getting that roll-up to match the admin is non-trivial because refunds post on the refund date, not the order date. If you need a defensible figure, start from the admin or ShopifyQL. If you need a line-level breakdown, use Data Export or the API and reconcile to the admin.

Why does Shopify include tax and shipping in Total Sales if the money is not mine?

Shopify defines Total Sales as the full amount the customer paid, not what the store keeps. Tax and shipping pass through the store on their way to the tax authority and the carrier. Including them gives a single top-line figure, but it is not revenue in an accounting sense. Net Sales (Gross minus Discounts minus Returns) is closer to recognized product revenue.

How do you get a Total Sales figure that matches your accounting software?

Match the date basis first (order date vs. invoice date vs. paid date), then the scope (store currency vs. presentment currency), then the treatment of refunds (netted on the refund date vs. reversed on the original order). Export a per-order breakdown from Data Export with all three columns side by side and compare to the accounting export line by line. The gaps almost always come from timing or currency, not from Shopify miscounting.

Can you see Total Sales broken down by order for a specific period?

Yes. In Data Export, build an order-level report with Gross Sales, Discounts, Refunds, Shipping, Taxes, Duties, and Fees as columns, filter to the period, and sort by order date. The sum of the Total Sales column should match the Analytics figure for the same window. If it does not, check for cancelled orders, test orders, or refunds that posted outside the window.

Does Total Sales change if an order is refunded weeks later?

Yes, for the refund date. Shopify posts the negative Returns value on the date the refund was issued, not the original order date. A sale made in January and refunded in March reduces March's Total Sales, not January's. This is why Total Sales for a closed period can shift slightly when you re-run the report.

What date does a sale hit Total Sales: order date, paid date, or fulfilled date?

Order processed date. Shopify recognizes the sale when the order is placed and paid. Refunds recognize on the refund date. Fulfillment status does not change Total Sales.

Conclusion

Total Sales is the headline number, but it is a stack, not a single figure. Once you can see the six components behind it and tie them back to the orders that built them, defending the number, reconciling it to payouts or accounting, and spotting the month something moved all get much easier. A reusable Data Export report is the shortest route from the admin headline to an auditable breakdown.

Next step

Install Data Export on your Shopify store, build the order-level report described above, and schedule it to deliver to finance every Monday. You will have a defensible Total Sales figure, and the breakdown behind it, before the first standup of the week.

Try Data Export free for 15 days

Custom reports, 100+ prebuilt reports and scheduled delivery on every plan, from $12 per month.

Share this article