Jul 18, 2026 · 10 min read

How to Run a Cohort Retention Analysis on Shopify

Daymark Product & Data TeamAnalytics practitioners at Daymark

First-hand guidance from the Daymark team on analytics workflows, growth reporting, and the operational metrics teams use to make decisions.

A cohort retention analysis answers one question your blended repeat rate cannot: are the customers you acquire this month worth more or less than the ones you acquired six months ago. You group customers by the month they first bought, then track how many come back in each following month. The result is a triangle of percentages that shows, at a glance, whether your business compounds or leaks.

You do not need an app or a data team to build one. This guide uses a plain Shopify order export and a spreadsheet. It walks through pulling the export, grouping customers by first-order month, building the month-by-month retention table, reading the shape of the triangle, and keeping it updated without rebuilding the sheet every month.

What a cohort retention table actually is

A cohort is a group of customers who share a starting point. Here the starting point is the month of a customer's first order. Once a customer is assigned to a cohort, they stay in it forever, which is the entire point: it lets you follow one specific group of people across time instead of blending everyone together.

The table puts cohorts down the rows and elapsed months across the columns. Each cell shows the percentage of that cohort who placed an order in that month. Month 0 is always 100%, because everyone in the cohort bought in their first month by definition. Month 1 is the share who came back the next month, month 2 the month after, and so on. Because older cohorts have had more months to age, they fill in more columns, which is what gives the table its triangular shape.

Read down a column to compare cohorts at the same age. Read across a row to see one cohort decay over time. Both readings matter, and the how-to below builds toward both.

Before the steps: what you need

The whole analysis runs on one file and one pivot table. Here is the sequence: export your orders from Shopify, reduce each order to the fields you need, tag every order with its customer's first-order month, then pivot cohorts against elapsed months. Each step below is self-contained, so you can stop after the export and pick up later.

Step 1: Pull the Shopify order export

In Shopify admin, go to Orders, then Export, and choose all orders for the full date range you want to analyze. Export as CSV. You want at least twelve months of history so cohorts have room to age; twenty-four is better if you have it.

The export is large and has dozens of columns. You only need four: the customer identifier (email or customer ID), the order date (Created at), the order name, and the order total. Everything else is noise for this analysis.

Step 2: Reduce each order to first-order month plus order month

For every customer, find the date of their earliest order. Convert it to a year-month label like 2026-01. That label is the customer's cohort, and it never changes.

Then for every individual order, convert its own order date to a year-month label. This is the order's activity month. Now each order carries two dates: the cohort it belongs to (the customer's first-order month) and the month the order actually happened.

In a spreadsheet, add a helper column that computes each customer's minimum order date with a MINIFS formula keyed on the customer identifier, then format both dates as YYYY-MM text. In practice this is two new columns next to your deduplicated order list.

Step 3: Calculate the month offset

The columns of a cohort table are elapsed months, not calendar months. So you need the gap between when a customer first bought and when each order happened.

Month Offset = (order year - cohort year) x 12 + (order month - cohort month)

A customer whose first order was 2026-01 and who ordered again in 2026-04 has a month offset of 3. Their first order has an offset of 0. Compute this offset for every order. This single number is what lets you line up a January cohort and a March cohort side by side at "month 3" even though those are different calendar months.

Step 4: Pivot cohorts against month offset

Build a pivot table. Put the cohort label (first-order month) on the rows and the month offset on the columns. For the values, use a distinct count of customers, not a count of orders, because retention measures how many people came back, not how many times.

This gives you a triangle of raw customer counts. Month 0 for each cohort equals the cohort's total size. To turn counts into retention percentages, divide every cell by its own row's month-0 count. Now every cell reads as "what share of this cohort was active in this month," and month 0 reads 100% across the board.

The result: a worked example cohort triangle

Here is what a finished table looks like for a mid-size apparel brand, showing the share of each monthly cohort that placed an order in each following month. Cohorts run down the left, elapsed months run across the top.

CohortSizeM0M1M2M3M4M5M6
2026-011,240100%14%9%11%7%8%7%
2026-021,090100%15%10%10%8%8%
2026-031,320100%18%12%12%10%
2026-041,510100%21%14%13%
2026-051,405100%22%15%
2026-061,600100%24%

Read it two ways. Across the 2026-01 row, retention falls from 14% in month 1 and then flattens around 7-8% from month 3 onward. Down the M1 column, the month-1 return rate climbs steadily from 14% for the January cohort to 24% for the June cohort. That column is the good news: newer customers are coming back faster, which usually means product, onboarding, or acquisition quality is improving.

Reading the cohort triangle: decay, plateau, PMF, and leaky bucket

The shape of each row tells you which business you actually have.

A healthy plateau is the signal you want. Retention drops after month 0, which is normal, then levels off and holds. In the example, the January cohort plateaus around 7-8%. A stable floor means a real segment of customers keeps coming back indefinitely, which is what product-market fit looks like in a purchase pattern. Those customers compound into LTV.

A leaky bucket looks different: retention keeps declining toward zero month after month with no floor. If the January row read 14%, 9%, 6%, 4%, 2%, 1%, that is a business with no repeat core. Every dollar of growth has to come from acquisition because nothing sticks, and that model gets more expensive every quarter as the acquisition auction tightens.

The column trend is the second, often more important, reading. Improving numbers down a column mean newer cohorts retain better than older ones, which is the trajectory you want and evidence that whatever you changed is working. Declining numbers down a column are an early warning that quality is slipping, and it shows up here months before it shows up in a blended average.

Keep it updating instead of rebuilding it monthly

The mistake most people make is treating this as a one-time export. A cohort table is only useful if it is current, and a manual rebuild every month is exactly the kind of chore that quietly stops happening by month three.

Two ways to keep it live. If you stay in a spreadsheet, structure the sheet so the raw order list is a single tab that you append new orders to, and build the cohort pivot to refresh off that tab so a data refresh regenerates the triangle without touching the formulas. If you would rather not maintain the pipeline at all, connect Shopify to a workspace that keeps the order history in sync and answer the cohort question on demand, so the table is always as fresh as your last order. Either way, the goal is that "how is retention trending" is a question you can answer in a minute, not a half-day export project you avoid.

Frequently Asked Questions

What is a cohort retention analysis?

A cohort retention analysis groups customers by a shared starting point, usually their first-order month, then tracks what share of each group buys again in each following month. Plotting cohorts as rows and elapsed months as columns produces a triangle of retention percentages. It reveals whether newer customers retain better than older ones, which a single blended repeat rate cannot show.

Can I run a cohort analysis on Shopify without an app?

Yes. Export your orders as CSV from Shopify admin, deduplicate to one row per order, then tag each order with the customer's first-order month and the month offset of that order. A pivot table with cohorts on the rows and month offset on the columns, counting distinct customers, produces the retention triangle. No app or SQL is required for the basic version.

What does a healthy cohort retention curve look like?

A healthy curve drops after month 0, which is normal, then flattens into a stable plateau that holds over time. That floor means a real segment of customers keeps returning indefinitely, the purchase-pattern signature of product-market fit. A curve that keeps declining toward zero with no floor is a leaky bucket, where growth depends entirely on constant new acquisition.

Should cohort retention count customers or orders?

Count distinct customers, not orders. Retention measures how many people came back in a given month, so a customer who placed three orders in one month still counts once. Counting orders inflates the numbers and mixes purchase frequency into a metric that is meant to track return behavior. Use a distinct count of customer identifiers in the pivot value.

How much order history do I need for a useful cohort analysis?

At least twelve months, so early cohorts have time to age and reveal whether they plateau or decay. Twenty-four months is better and lets you see seasonal effects and longer repeat cycles. With less than a few months of data, every cohort is too young to show a plateau, and you cannot yet tell a slow-returning customer base from a leaky bucket.

Where to go next

Build the triangle once by hand and you will read every future one faster. The shape of the rows tells you if you have a repeat core, and the trend down the columns tells you if it is getting stronger.

For the strategy this feeds into, read the D2C retention playbook. Go deeper on the underlying metrics with repeat purchase rate and lifetime value, and size the impact of a retention change with the repeat purchase rate calculator.

Related articles