Retention analytics

How do you do cohort analysis for a Shopify store?

A retention cohort is a group of customers who made their first purchase in the same period. Here's how to build monthly cohorts from Shopify order data, a sample table walked through cell by cell, and how to spot the patterns that actually mean something.

Quick answer: Group customers into cohorts by the month of their first order, then track the percentage of each cohort that buys again in month 1, month 2, and so on. Read down a column to compare cohorts at the same age; read across a row to watch one cohort decay.

What is a retention cohort?

A retention cohort is a group of customers who made their first purchase in the same period — usually a calendar month. Instead of asking "what share of all my customers came back this month?", cohort analysis asks "of the customers I acquired in January, how many were still buying in February, March, and April?"

That switch matters because blended averages lie. A store can show a healthy overall repeat rate simply because loyal customers from two years ago keep ordering, while every new cohort quietly retains worse than the one before it. Cohorts keep those stories separate, so you can see whether the customers you're acquiring today are actually coming back.

Cohort retention and churn are two views of the same loss: a cohort sitting at 21% retention in month 3 means 79% of that cohort has churned by month 3 (the store-wide version of that math is covered in how to calculate customer churn rate). Shopify's admin also ships a built-in cohort report — where it lives and what it can't tell you is covered in Shopify analytics for customer retention.

How to build monthly cohorts from Shopify data

You need three columns of data and a spreadsheet. Shopify's order export provides everything required; a pivot table does the counting. Here is the full procedure.

Step 1: Export your Shopify order data

Export your orders from the Shopify admin (or a reporting app) with at least three fields per row: a customer identifier (email or customer ID), the order date, and the order total. Every order must be attributable to exactly one customer — match guest checkouts by email so a returning guest isn't counted as a new person.

Step 2: Assign each customer to an acquisition cohort

Find each customer's first-ever order date and label the customer with that calendar month. Everyone whose first order landed in January 2026 is the January cohort — and they stay in it forever. Cohort membership never changes. This is the step people most often get wrong: cohort by first order only, never by "any order placed that month."

Step 3: Count active customers per month offset

For each cohort, count the distinct customers who placed at least one order in month 0 (the acquisition month itself), month 1 (the following calendar month), month 2, and so on. A customer who orders three times in month 2 still counts once — you're measuring "did they come back," not "how much did they buy."

Step 4: Convert counts to retention percentages

Month-N retention (%) = (cohort customers with an order in month N ÷ cohort size) × 100
A 420-customer January cohort with 143 buyers in February has month-1 retention of (143 ÷ 420) × 100 = 34%.

Month 0 is always 100% by definition — every member of the cohort bought during their acquisition month. Percentages (rather than raw counts) are what make cohorts of different sizes comparable.

Step 5: Lay the results out as a grid

Rows are acquisition months; columns are month offsets. Because newer cohorts haven't lived long enough to fill every column, the table forms a triangle — the empty cells aren't missing data, they're the future. A spreadsheet pivot table produces this layout in one pass.

A sample cohort retention table

Here's what the output looks like for a fictional store. The numbers below are illustrative — realistic shapes to learn the reading skill on, not benchmarks to compare yourself against.

CohortCustomersMonth 0Month 1Month 2Month 3Month 4Month 5
Jan 2026420100%34%25%21%18%16%
Feb 2026380100%31%23%19%17%
Mar 2026510100%38%29%24%
Apr 2026460100%41%31%
May 2026490100%43%

Read the January row first. The cohort is 420 customers, and month 0 shows 100% — all 420 bought in January, by definition. Month 1 shows 34%: about 143 of those 420 came back in February. Month 2 drops to 25% (roughly 105 customers), month 3 to 21%, month 4 to 18%, and month 5 to 16% — about 67 customers still buying in June. Notice the shape: the single biggest drop is between month 0 and month 1, and the curve flattens as it ages. That flattening tail is the loyal core — the customers for whom this store has become a habit.

Now read down the Month 1 column: 34%, 31%, 38%, 41%, 43%. Every cell here is a cohort at the same age, so this is a fair comparison. February's dip to 31% is worth a glance, but one soft month is often noise. The jump to 38% in March — holding through April (41%) and May (43%) — is a real trend: something the store changed around March, whether a post-purchase email flow, a stronger second-purchase offer, or a shift in acquisition channels, is bringing early repeat buyers back at a meaningfully higher rate.

Finally, the dashes: February's month 5 and everything below the staircase edge simply hasn't happened yet. The May cohort (490 customers) has only month 0 and month 1 so far. Resist comparing May's 43% against January's 16% — that's a four-month age difference, not a performance difference.

How to read the table: rows, columns, diagonals

Rows show one cohort aging. Read across to see the decay curve. Where the row flattens is your habitual buyer base; a row that never flattens and keeps sliding toward zero is the signature of a one-and-done product experience. Month-1 retention in particular is the cohort-level cousin of your repeat purchase rate — the same early-repeat behavior viewed store-wide.

Columns compare cohorts at the same age — the only fair fight in the table. Column values improving from top to bottom mean acquisition quality or onboarding is getting better; column values declining mean growth in new customers may be masking decay in how well you keep them.

Diagonals share a calendar month. January's month 3, February's month 2, and March's month 1 all happened in April. If April brought a site outage, a stockout, or a huge sitewide sale, you'll see a stripe running diagonally across the table. The triage rule: a dipping diagonal points to a calendar event, a weak row points to that cohort's acquisition source, and a column trend points to something you changed.

One thing no cohort table does is name customers. It tells you the March cohort is decaying — not which March customers are about to lapse. Closing that gap takes per-customer scoring, which is what predictive churn scoring is for.

Common cohort analysis mistakes

ChurnMiser turns cohort insight into action: it scores every Shopify customer's churn risk nightly — calibrated to your store's own baseline — and auto-builds win-back campaigns for the at-risk customers a cohort table can only gesture at as a percentage.

Frequently asked questions

How do you do cohort analysis for a Shopify store?

Group customers into cohorts by the month of their first order, then track the percentage of each cohort that buys again in month 1, month 2, and so on. In practice: export your orders, assign each customer to a first-purchase month, count who ordered in each later month, and divide by cohort size.

What is a retention cohort?

A retention cohort is a group of customers who made their first purchase in the same period, usually a calendar month. Tracking each cohort separately shows how retention changes as customers age, and whether newer cohorts are retaining better or worse than older ones — something blended averages hide.

How do you read a cohort retention chart?

Rows show one cohort aging: the percentages fall as months pass and flatten where loyal customers remain. Columns compare every cohort at the same age, which is the only fair comparison. Diagonals share a calendar month, so a store-wide event shows up as a diagonal stripe across the table.

How many months of data do you need for cohort analysis?

Six months of order history is a practical minimum: it gives your oldest cohort five repurchase windows while leaving enough cohorts to compare. Stores with long purchase cycles should use quarterly cohorts instead, so slow reorder patterns are not misread as churn.

See your store's churn risk in 2 minutes

Take the free ChurnMiser retention audit — answer 7 questions and get a personalized revenue-leak report showing exactly where you're losing customers. No credit card.

Take the free retention audit →

Or install ChurnMiser from Shopify and start scoring customers today.