Blog

How Do You Calculate Profit and Loss for Your Store?

How Do You Calculate Profit and Loss for Your Store?

Periwinkle clipboard sticker with a rising bar chart report

Jesús Avendaño

·

Your Shopify dashboard shows strong sales, but your bank balance doesn't seem to reflect them. You've paid suppliers, funded Meta campaigns, covered shipping and refunded customers. Somewhere between orders and payouts, the amount you earned has become difficult to see.

So, how do you calculate profit and loss without mistaking sales for earnings? Build a statement that follows the money from net revenue through product costs, operating expenses, interest and tax. For an ecommerce store, that means accounting for refunds, returns, advertising and platform fees before calling anything profit.

What Each P&L Line Measures and When Profit Turns to Loss

Net profit is what remains after revenue covers the products sold, operating costs, interest and tax, calculated in that order. A profit-and-loss statement, or P&L, separates those stages so you can identify where you're earning money and where you're losing it.

Choose a defined reporting period, usually a month or quarter. Every revenue and expense line must relate to that same period, rather than combining this month's sales with whichever bills happened to clear the bank.

P&L stages, formulas and what each one tells you

Stage

Formula

What it tells you

Net revenue

Gross sales minus discounts, refunds, returns and sales tax collected

Sales the business actually keeps

Cost of goods sold

Beginning inventory plus purchases and freight minus ending inventory

What the goods sold in the period really cost

Gross profit

Net revenue minus COGS

Whether the product economics work

Operating profit

Gross profit minus operating expenses

Whether the business covers overhead, ads and fees

Net profit

Operating profit plus other income and interest income minus interest, other expenses and tax

What's left after everything

For a straightforward example, $100,000 in sales, less $40,000 in COGS, produces $60,000 in gross profit; subtracting $30,000 in operating expenses and $6,000 in tax leaves $24,000 in net profit, following the staged calculation explained in the FDIC's financial management guide.

Non-operating items add another step. Using the calculation described in Bank of America's P&L guide, $30,000 operating profit + $1,000 interest income − $4,000 interest expense − $6,000 tax = $21,000 net profit. The same structure can produce a loss: $18,000 operating profit − $22,000 in interest, other expenses and tax = a $4,000 net loss.

Find where the result weakens

Weak gross profit points toward pricing, discounts or product costs. Healthy gross profit followed by weak operating profit points toward advertising, fees or overhead. A weak net result after healthy operating profit directs attention to financing and other non-operating items.

Diagnostic rule: Find the first line that becomes negative, but also investigate positive lines that leave too little to cover the costs below them.

When pre-tax income is negative, income tax may be nil or a credit, depending on local rules and adjustments. Check the treatment with your accountant rather than applying a standard tax percentage automatically.

Profit is a dollar amount; margin expresses it relative to sales. Use the profit margin calculation guide when comparing the size of those results.

How to Calculate Net Revenue and Cost of Goods Sold

Start with the sales and inventory records, not the bank feed. Your order export establishes the sales activity; inventory records establish which product costs belong against it.

Build the sales and inventory totals

  1. Pull gross sales from Shopify orders. Filter the export to your reporting window, using orders rather than payouts as the starting point. For an accrual P&L, check fulfillment and revenue-recognition timing so unfulfilled orders aren't automatically treated as earned revenue.

  2. Subtract checkout discounts. Include discount codes and automatic discounts that reduced the selling price. Check whether your export already deducts them, because subtracting them again understates revenue.

  3. Subtract refunds and returns. Record the adjustments processed during the reporting period and identify orders still open for return if you'll estimate future refunds. Don't deduct a return twice when the refund record already captures the reversal.

  4. Exclude sales tax collected. Tax collected for a tax authority isn't income the store keeps. If the sales field already excludes it, no further deduction is needed.

  5. Calculate inventory consumed. Use beginning inventory plus purchases, inbound freight, duties and applicable production costs, minus ending inventory. Applying the inventory method in Chase's P&L preparation guidance to a hypothetical store, $20,000 beginning inventory + $60,000 purchases + $5,000 freight − $15,000 ending inventory = $70,000 COGS; against $120,000 revenue, that leaves $50,000 gross profit.

  6. Confirm unsold stock remains in ending inventory. Count warehouse stock and reconcile it with the inventory ledger. Using the total of supplier invoices as COGS incorrectly treats products you haven't sold as this period's expense.

Check the product-level result

Calculate gross margin = gross profit ÷ net revenue, then express the result as a percentage. Use net revenue consistently, rather than dividing by a larger gross-sales figure.

Check the calculation by product or variant. A storewide total can conceal an item with expensive inbound freight, heavy discounting or an outdated recorded cost.

Operating Expenses, Ad Spend and Platform Fees to Include

Record advertising expense, not advertising-attributed revenue. Meta and Google Ads may each report sales associated with their campaigns, but those revenue figures aren't expenses and shouldn't replace actual spend.

Pull spend incurred during the reporting period and reconcile it to billing records, allowing for billing thresholds or delayed charges. Split it by campaign or product when the attribution is supportable, and keep an unallocated amount when it isn't.

Ecommerce cost items and how to allocate them

Cost item

Typical examples

Allocation rule

Advertising

Meta and Google Ads spend

Actual spend billed for the period, adjusted for timing, split by campaign or product where possible

Platform fees

Shopify plan fee, paid apps

Monthly total recorded as operating expense

Payment processing

Card and wallet fees

Taken from the payment report for the period, not estimated

Fulfillment and shipping

Pick and pack, packaging, shipping you absorb

Monthly total, or divided by orders for a per-order margin

Staff and software

Contractors, helpdesk, analytics tools

Monthly total for the period

Rent and fixed costs

Warehouse space, insurance

Monthly share of the fixed cost

Payment processing can include a percentage charge and a fixed transaction charge. Use the actual payment report, including applicable adjustments, rather than assuming every transaction costs the same. A Shopify fee calculator can support planning, but the report establishes the booked expense.

Classify consistently and count each cost once

For this statement, fulfillment and absorbed shipping sit below gross profit. If your accounting policy places a directly attributable fulfillment cost in COGS instead, don't also include it in operating expenses. The important distinction is between a reasonable classification choice and accidentally omitting or duplicating a cost.

Staff, contractors, helpdesk software and rent can be recorded as monthly totals for the storewide statement. When building product-level reporting, label allocated fixed costs separately from costs directly caused by each order.

Evidence test: If you can't name the invoice, fee report, payroll run or other record supporting a cost, the amount isn't ready to be treated as reliable.

Loan interest belongs after operating profit, not in this operating bucket. Total operating expenses once, retain the supporting schedule and reuse that same total in each view of the P&L.

Worked Example of a Month for a Shopify Brand

Consider a hypothetical candle brand with a busy sales month. Its order dashboard looks encouraging, but the completed statement shows how little remains after customer adjustments and acquisition costs.

The hypothetical statement below includes the full operating-cost breakdown, interest and tax.

Monthly P&L for a candle brand with $60,000 gross sales

All amounts below are illustrative assumptions, not reported results from an actual store. Sales tax is excluded from this example.

Line

Amount ($)

Note

Gross sales

60,000

Orders placed in the month

Discounts

-6,000

Discount codes at checkout

Refunds and returns

-4,000

Processed in the month

Net revenue

50,000

Sales the business keeps

Cost of goods sold

22,000

Opening stock plus purchases and freight minus closing stock

Gross profit

28,000

Net revenue minus COGS

Advertising

14,000

Meta and Google Ads spend

Platform, app and payment fees

2,800

Shopify plan, apps, payment processing

Fulfillment and shipping subsidy

3,800

Shipping the brand absorbs

Staff and software

4,600

Contractors and tools

Total operating expenses

25,200

Sum of the four lines above

Operating profit

2,800

Gross profit minus operating expenses

Interest expense

400

Loan interest

Income tax

600

Tax on the period's profit

Net profit

1,800

Profit after all listed expenses

Read the margins, not just the sales total

In this scenario, discounts and refunds reduce $60,000 gross sales to $50,000 net revenue. After $22,000 COGS, the brand earns $28,000 gross profit, a 56% gross margin.

That doesn't mean the owner can spend the gross profit. The assumed operating expenses consume $25,200, leaving $2,800 operating profit, or a 5.6% operating margin. Interest and tax then reduce earnings to $1,800, a 3.6% net margin.

Advertising alone represents 28% of this hypothetical brand's net revenue. That makes campaign contribution an important lever to test, though cutting spend indiscriminately could also reduce profitable orders. Compare products, campaigns and customer groups before changing the budget.

A strong product margin can coexist with a thin net margin. The difference is the cost of acquiring, serving and running the business.

Leaving out the assumed $4,000 of refunds would overstate the bottom line by $4,000 before tax effects and any associated cost adjustments, more than double the scenario's actual net profit. That's why a plausible-looking dashboard total isn't enough.

Finish with a line-by-line check: each amount should trace back to orders, inventory records, ad billing, fee reports, payroll or another identifiable record.

Does Each Sale Pay?

The historical P&L tells you what happened across the business. Contribution margin answers a different question: does the next order leave money to cover fixed costs and eventually generate profit?

Start with costs that change when you sell another unit: product cost, payment fees, per-order fulfillment, absorbed shipping and expected return costs. When evaluating an acquisition campaign, include advertising cost per acquired order too.

Calculate contribution and break-even

Break-even analysis, a staple of the U.S. Small Business Administration's planning guidance, compares fixed costs with what each sale contributes. In sales dollars, break-even equals fixed costs divided by contribution margin. For unit planning, divide fixed costs by contribution dollars per unit instead.

Take this hypothetical product, assuming its net selling price is $40:

Variable cost per unit

Illustrative amount

Product cost

$14.00

Payment fee

$1.20

Fulfillment and absorbed shipping

$5.00

Returns allowance

$1.00

Advertising per order

$9.00

Total variable cost

$30.20

  1. Add variable costs. In this scenario, the total is $30.20 per unit. Keep fixed overhead out of this subtotal.

  2. Subtract from the net selling price. Contribution is $40 − $30.20 = $9.80 per unit.

  3. Divide contribution by price. The hypothetical contribution margin is $9.80 ÷ $40 = 24.5%.

  4. Calculate break-even volume. With assumed monthly fixed costs of $4,900, break-even is 500 units, equivalent to $20,000 in sales. Dividing $4,900 by 24.5% gives the same sales-dollar result.

Use the contribution margin guide to keep contribution distinct from gross profit and net profit. They answer different questions and include different cost groups.

Stress-test the acquisition cost

Suppose advertising cost in this example rises from $9 to $12 per order, with everything else unchanged. Contribution falls to $6.80, the margin falls to 17%, and break-even rises to 721 whole units, rounded up.

That's why a campaign can continue generating sales while making the business harder to sustain. Test shipping, discounts and returns as well as advertising, and compare new-customer orders with repeat purchases.

If contribution becomes negative after acquisition cost, additional orders increase the loss under those assumptions. Change the price, product economics or campaign before increasing spend.

Fix P&L Errors Before You Trust the Number

A believable profit figure can still be wrong. Challenge the assumptions behind it before using it to set advertising budgets or decide how much cash you can withdraw.

Replace common beliefs with checks

  • A payout is my revenue. A settlement reflects fees, adjustments and payment timing. Reconcile it to sales and receivables instead of copying it into the revenue line.

  • The order total is what I earned. Check whether later customer adjustments reversed part of that value. Use the actual net-sales records rather than the original order total.

  • A refund captures the whole return cost. Add return shipping, inspection, support, repackaging, restocking and markdowns where applicable. Separate recoverable stock from goods that can't be resold.

  • Positive ROAS means positive profit. Test contribution after discounts, product costs, fees and acquisition expense. Revenue attribution alone doesn't establish profitability.

  • Small subscriptions don't matter. Reconcile app charges and processing fees to their reports. Individually modest costs still belong in the statement.

The National Retail Federation's 2025 Retail Returns Landscape projected that 19.3% of online sales would be returned in 2025. That measures online sales, not a universal return rate for every store or a share of online orders. Use your own product and cohort history when estimating future return costs.

Reconcile profit with available cash

A profitable month doesn't guarantee a rising bank balance. As Chase explains in its cash-flow-versus-profit guide, inventory purchases, payment timing, loan repayments and owner withdrawals can create differences between accounting profit and cash movement.

For your monthly close, reconcile net revenue to settlements, attach supporting documents to costs and prepare a separate cash reconciliation. Investigate the difference rather than changing the P&L to match the bank balance.

For automation, we let you enter variant costs manually or import them from a spreadsheet, calculate margin on every product sold and schedule profit reports by email or Slack. Our fee calculator uses your Shopify plan, payment method, average order value and monthly orders to estimate per-order and monthly fees. It covers US online rates only; other countries and in-person sales have different rates.

Cifra brings sales, product costs, advertising, shipping and fees into a profit view you can examine by product and campaign. Visit Cifra to connect your store, add your costs and build a recurring report that shows what remains after the sale.

Jesús Avendaño

·