D2C Growth

Cohort Analysis for Ecommerce: A Step-by-Step Guide

How to do cohort analysis for ecommerce step by step — build acquisition, behavioral, and revenue cohort tables, interpret the retention curve, and act on the data to improve LTV.

Siddharth Gangal 16 min read
Cohort Analysis for Ecommerce: A Step-by-Step Guide
On this page
  1. What Is Cohort Analysis for Ecommerce?
  2. Three Types of Cohort Analysis That Matter for Ecommerce
  3. Step 1: Gather the Right Data
  4. Step 2: Define Your Cohort Groups
  5. Step 3: Build the Cohort Retention Table
  6. Step 4: How to Read Cohort Analysis Results
  7. Step 5: Build Channel-Level Cohort Analysis
  8. Step 6: Build Revenue Cohort Analysis
  9. Retention Rate Benchmarks for Ecommerce
  10. How to Act on Cohort Analysis Data
  11. Tools for Cohort Analysis in Ecommerce
  12. How Fairview Automates Cohort Analysis for DTC Operators
  13. Key Takeaways

TL;DR

Cohort analysis for ecommerce groups customers by first purchase date and tracks what percentage return to buy again in month 1, month 2, month 3, and beyond. The output — a retention heatmap — reveals whether customer quality is improving, declining, or flat over time. This guide covers the three cohort types that matter (acquisition, behavioral, revenue), a six-step process to build your first table, retention benchmarks by category, and the specific actions operators take when cohort data reveals a problem.

What Is Cohort Analysis for Ecommerce?

A cohort is a group of customers who share a common starting event. In ecommerce, that event is almost always the first purchase date. Every customer who placed their first order in January 2025 belongs to the January 2025 cohort.

Cohort analysis tracks what happens to that group over time. Did 40% of January buyers return in February? Did 30% return in March? By month 6, what percentage of the original January cohort had made at least one more purchase?

The result is a table — rows are cohorts, columns are months since first purchase — that shows your brand's repeat purchase behavior in precise, comparable terms. Reading this table tells you whether your retention is improving or eroding, and which customer segments drive the most durable revenue.

The case for doing this rigorously: retained customers generate 3–5x more revenue per year than first-time buyers, and acquiring a new customer costs 5–7x more than retaining an existing one. A 5% improvement in retention can increase total revenue by 25–95% depending on the business model. These numbers only move if you can measure where the current baseline sits and which cohorts are underperforming.

WHY AGGREGATE REVENUE METRICS MISLEAD SCENARIO A — Revenue up 40% YoY New customers acquired: +80% M1 retention rate: 18% (down from 32%) M3 retention rate: 9% (down from 21%) Reality: customer quality deteriorating fast Growth is all acquisition — LTV collapsing SCENARIO B — Revenue up 40% YoY New customers acquired: +15% M1 retention rate: 38% (up from 28%) M3 retention rate: 28% (up from 18%) Reality: compound LTV engine building Same revenue growth, fundamentally different business

Two brands, identical revenue growth, opposite retention trajectories. Only cohort analysis reveals the difference.

Three Types of Cohort Analysis That Matter for Ecommerce

Cohort Analysis Ecommerce Step By Step

Not all cohorts are equal. The three that operators use most — acquisition cohorts, behavioral cohorts, and revenue cohorts — answer different questions.

Acquisition Cohorts

The most common type. Group customers by their first purchase month and track repeat purchase rates over time. This answers: how well does the brand retain customers acquired in a given period? It catches macro-level retention shifts caused by changes in ad creative, product quality, or post-purchase experience.

Behavioral Cohorts

Group customers by what they did on their first order — the product category they bought, whether they used a discount code, which channel drove acquisition, or whether they subscribed to email at purchase. Behavioral cohorts answer: which actions or entry points correlate with higher long-term retention and LTV?

A brand may find that customers who buy a specific "hero product" first have 2x the month-3 retention of customers who buy a promotional item first. That is an actionable finding that changes which products get featured in acquisition campaigns.

Revenue Cohorts

Track revenue per customer over time, not just the count of returning customers. A cohort that retains 35% of customers but whose returning buyers spend half as much as the original order is less valuable than a 30% retention cohort whose returning buyers increase average order value. Revenue cohorts measure cumulative revenue per cohort member over time — the direct input to LTV calculation.

Step 1: Gather the Right Data

1

Pull every order record with customer identity and date

The minimum data set for cohort analysis is: customer ID, order date, order revenue. Everything else is optional enrichment.

The required fields for a basic acquisition cohort table:

FieldPurpose in Cohort AnalysisSource
Customer IDLinks all orders to the same personShopify / order system
Order dateDetermines cohort assignment and time-since-first-purchaseShopify / order system
Order revenueRequired for revenue cohorts and LTV calculationShopify / order system
Acquisition channelRequired for channel-level cohort breakdownUTM params / ad attribution
First order flagIdentifies cohort membership dateDerived from order history

Guest checkout orders without customer IDs create gaps in cohort analysis. A customer who checked out as a guest on their first order cannot be linked to a later order even if they create an account. Brands with high guest checkout rates undercount retention — the actual repeat purchase rate may be materially higher than what the cohort data shows. Shopify's customer match logic can close some of this gap using email address matching.

Export the full order history. Do not limit to recent orders — cohort analysis requires longitudinal data. A 12-month history is the minimum for a meaningful cohort table. 24 months gives you enough cohorts to identify trends.

Step 2: Define Your Cohort Groups

Cohort Analysis Ecommerce Step By Step
2

Assign every customer to exactly one cohort

The cohort assignment rule must be consistent. For acquisition cohorts: use the month and year of first order. Every customer belongs to exactly one cohort.

Monthly cohorts are standard for most ecommerce brands. Weekly cohorts work for high-volume brands (10,000+ orders per month) where monthly data blurs important week-to-week variations in ad performance. Quarterly cohorts are too coarse — they obscure seasonal effects and take too long to generate actionable data.

The cohort definition rule: a customer's cohort is determined by the month of their first ever order. If a customer placed their first order in March 2025 and their second order in July 2025, they belong to the March 2025 cohort for all time — the July order counts as month 4 activity for that cohort.

For behavioral cohorts, define the segmentation before pulling data. Common behavioral cohort dimensions for ecommerce:

  • Acquisition channel: Paid social vs. paid search vs. organic vs. email vs. influencer
  • First product category: Which category the customer's first order came from
  • Discount status: First order at full price vs. first order with a discount code
  • Order value tier: First order under $50 vs. $50–$100 vs. $100+
  • Geographic region: For brands with meaningful cross-region variation

Step 3: Build the Cohort Retention Table

3

Calculate retention rates for each cohort at each time interval

The table is built on a simple calculation: for each cohort, what percentage of the original members made at least one purchase in each subsequent month?

The formula for each cell:

Retention Rate (Cohort C, Month M) = Customers in Cohort C who purchased in Month M ÷ Total customers in Cohort C

Month 0 is always 100% — every cohort member made at least one purchase in the month they were acquired (by definition). Month 1 shows the percentage of that cohort who returned in the following month. Month 2 shows the percentage who returned 2 months after their first purchase. The diagonal across the table (where data runs out) marks the current reporting date.

SAMPLE ACQUISITION COHORT TABLE — Retention by Month

Cohort Size M0 M1 M2 M3 M4 M5
Jan 2025 412 100% 38% 27% 22% 18% 15%
Feb 2025 387 100% 41% 30% 24% 19% --
Mar 2025 524 100% 44% 33% 27% -- --
Apr 2025 498 100% 47% 35% -- -- --

M1 retention improving Jan–Apr 2025 (38% → 47%). This is a positive signal worth investigating for cause.

To build this in a spreadsheet: create one row per cohort. In column A, list the cohort label (Jan 2025, Feb 2025, etc.). In columns B onward, enter the retention rate at each month interval. Apply conditional formatting with a color scale to make the heatmap pattern visible immediately.

The diagonal of blank cells (marked "--") represents time periods that have not yet elapsed. April 2025's month-3 data does not exist yet if the current date is June 2025. Do not interpolate or estimate these cells — leave them blank.

Step 4: How to Read Cohort Analysis Results

4

Look for three patterns: the retention curve, cross-cohort trends, and anomalies

Each pattern points to a different operational question.

Pattern 1: The Retention Curve

Read any single row from left to right. The rate at which retention drops from M0 to M1 to M2 is your brand's retention curve. Most brands see a steep drop from M0 (100%) to M1 (20–45%), then a shallower decline from M1 onward. The M1 rate is the single most important number in the table — it is the first test of whether first-time buyers find enough value to return.

Pattern 2: Cross-Cohort Trends

Read any single column from top to bottom. This shows whether M1 retention (or M3, or M6) is improving or deteriorating across consecutive cohorts. If M1 retention is rising month over month — say, from 28% for the January cohort to 38% for the April cohort — something changed that improved repeat purchase behavior. Identify what changed: new post-purchase email sequence, new product, change in onboarding, or shift in which customer segments were acquired.

Pattern 3: Anomalies

Look for cohorts that break the trend. A single month with materially lower retention at M1 often points to a product quality issue, a fulfillment problem, or a campaign that attracted low-intent buyers. A single month with much higher retention often points to a promotional strategy or ad creative that attracted a particularly high-value customer segment. Both anomalies deserve investigation.

THREE RETENTION CURVE SHAPES 100% 50% 25% 0% M0 M1 M2 M3 M4 M5 M6 A B C A: Strong retention (consumables/sub) B: Average D2C C: High churn

Curve A flattens — a loyal base forms. Curve C collapses — nearly all customers are one-time buyers.

Step 5: Build Channel-Level Cohort Analysis

5

Segment the cohort table by acquisition channel

Blended cohort data hides channel-specific retention differences that are often dramatic — and actionable.

A blended retention table shows you what is happening. A channel-level cohort table shows you why — and which channels to scale versus cut.

Build separate cohort tables for each major acquisition channel: paid social (Meta), paid search (Google), organic search, email/SMS, influencer, and affiliate. The differences you find are usually significant:

  • Paid social cohorts often show high M0 volume but lower M1 retention (18–28%) because broad audience targeting acquires discount-motivated or impulse buyers who do not develop brand attachment.
  • Organic search cohorts typically show higher M1 retention (30–45%) because customers arrived with purchase intent after researching the product category. They chose the brand deliberately.
  • Email referral and loyalty cohorts often show the highest retention — 40–60% at M1 — because these customers already trust the brand before their first purchase.
  • Influencer cohorts vary widely. Nano-influencer audiences with strong niche fit often outperform broad macro-influencer campaigns on retention by a significant margin.

The operational implication: a channel with lower CAC but worse cohort retention may generate less total lifetime value than a channel with higher CAC but stronger retention. The cohort analysis guide covers the CAC-to-LTV ratio calculation that accounts for retention differences across channels.

For a full framework on channel profitability that incorporates cohort retention data, see the guide on operating intelligence for DTC brands.

Step 6: Build Revenue Cohort Analysis

6

Track cumulative revenue per cohort member, not just the count of returning customers

Revenue cohorts are the bridge between retention analysis and LTV calculation.

A revenue cohort table uses the same structure as a retention table — rows are cohorts, columns are months — but the cells contain cumulative revenue per original cohort member rather than a retention percentage.

The formula for each cell:

Revenue Per Customer (Cohort C, Month M) = Total revenue from Cohort C in months 0 through M ÷ Total customers in Cohort C

A sample revenue cohort table might show:

CohortM0M3 CumulativeM6 CumulativeM12 Cumulative
Jan 2025$62$89$104$121
Feb 2025$65$97$116$138
Mar 2025$68$106$128
Apr 2025$71$115

This table shows two valuable signals simultaneously. First, average order value on first purchase is rising (from $62 to $71 across cohorts) — a positive sign for new customer quality. Second, M3 cumulative revenue per customer is rising at a faster rate than first-order value ($62 to $89 = +44% for Jan; $71 to $115 = +62% for Apr) — the newer cohorts are returning more often or spending more on return visits.

The M12 column, when it exists, is your 12-month LTV by cohort. Tracking this over time shows whether the fundamental economics of customer acquisition are improving. If 12-month LTV is rising while CAC holds steady, the business is compounding value. If LTV is flat while CAC rises — the common D2C scaling trap — the economics are deteriorating even if revenue is growing.

12-MONTH LTV BY COHORT — Improving Economics Signal Jan 24 Apr 24 Jul 24 Oct 24 Jan 25 Apr 25 $88 $97 $105 $114 $121 $138 12-mo LTV

12-month LTV rising across consecutive cohorts — evidence that retention programs are compounding value over time.

Retention Rate Benchmarks for Ecommerce

Benchmarks vary significantly by category and business model. Use these ranges as calibration points, not performance targets. A brand in a consumables category should outperform the general D2C range on retention; a one-time purchase category like furniture or mattresses will underperform it.

Time IntervalStrongAverage D2CNeeds Work
M1 Retention38–55%22–37%Below 22%
M3 Retention28–40%15–27%Below 15%
M6 Retention20–32%10–19%Below 10%
M12 Retention15–25%7–14%Below 7%

Subscription D2C brands operate at different benchmarks. A subscription brand should maintain 70–85% month-1 retention (subscriber renewal rate) and 55–70% at month 3. Subscription churn below 5% monthly is considered strong; above 10% monthly requires immediate diagnosis.

Ecommerce brands with strong retention programs — post-purchase email sequences, loyalty points, subscribe-and-save programs — typically see M1 retention 8–15 percentage points above brands without these programs, all else equal. The lift is measurable within 90 days of launching a structured post-purchase sequence.

For context on how retention benchmarks connect to return rate and inventory efficiency, see the guides on return rates for ecommerce and inventory turnover.

How to Act on Cohort Analysis Data

A cohort table with no action taken is a spreadsheet exercise. The value comes from the operating decisions the data informs. Here are the six actions ecommerce operators take most often when cohort analysis reveals a specific pattern.

Action 1: M1 Retention Below Benchmark

Launch or improve a post-purchase email sequence. The sequence that most reliably moves M1 retention: a product usage or education email at day 3, a social proof / review request at day 7, and a replenishment or related product offer at day 14. Brands that deploy this three-email sequence see M1 retention increases of 8–18 percentage points within the first cohort cycle.

Action 2: M1 Retention Strong But M3 Collapses

The second purchase is happening but the third is not. This usually points to a limited product catalog (nothing new to buy after the second order), a weak loyalty program that does not incentivize repeat visits, or a post-purchase experience gap at the 45–90 day mark. Deploy a 60-day win-back campaign targeting customers who made exactly one repeat purchase but have not returned in 45 days.

Action 3: One Cohort Month Dramatically Underperforms

Identify the specific cohort month and investigate what changed: product batch quality, fulfillment partner, ad creative, promotion type, or supply chain disruption. Discount-driven cohorts (customers whose first order used a 30–40% discount code) frequently show M1 retention 10–20 points below full-price cohorts. If that cohort month coincides with a major sale, the diagnosis is clear: the promotion attracted low-loyalty buyers.

Action 4: Channel Cohort Analysis Reveals One Channel Underperforms

Reallocate budget. If TikTok cohorts show M1 retention of 16% vs. Google organic cohorts at 41%, the effective LTV from TikTok may not justify the CAC even if ROAS appears acceptable. Calculate the 6-month revenue per customer from each channel's cohort data and divide by the channel's average CAC. The channel with the highest 6-month revenue-to-CAC ratio deserves the marginal budget dollar — regardless of which channel shows the highest reported ROAS.

Action 5: Behavioral Cohort Shows Hero Product Drives Better Retention

Shift ad creative and landing page strategy to feature the high-retention-entry product. If customers who first buy the brand's protein powder cohort show M3 retention of 34% vs. customers who first buy the energy bar cohort at 19%, paid social campaigns should drive first purchases toward the protein powder. The first product a customer buys shapes their long-term relationship with the brand.

Action 6: Revenue Per Cohort Member Is Flat Despite Returning Customers

Returning customers are buying less on each visit. This signals that the first purchase was the high-value order and repeats are lower-AOV top-up purchases. The fix is upsell and cross-sell sequencing: ensure post-purchase emails feature complementary products with higher average order values, and test bundle offers in the email sequence at the 30-day mark.

Tools for Cohort Analysis in Ecommerce

The right tool depends on data volume and analytical depth required.

ToolBest ForLimitations
Google Analytics 4Free baseline cohort view for traffic and engagementDoes not connect to revenue or order data natively; no channel-level breakdown by first purchase
Shopify AnalyticsBuilt-in repeat customer rate and basic cohort viewLimited to Shopify data; no ad platform integration; cannot build channel-level cohorts
Google Sheets / ExcelFull control over calculation methodology; works for any order exportManual rebuild required each month; no automation; breaks at high order volume
KlaviyoEmail-channel behavioral cohorts and list segmentationEmail-centric view; does not cover non-email acquisition channels; no contribution margin data
Looker / TableauCustom cohort dashboards with full data model controlRequires data engineering; significant setup cost; not practical for sub-$10M brands
FairviewAutomated cohort tracking connected to Shopify, ad platforms, and accounting; channel-level retention and revenue cohorts updated weeklyDesigned for operating cadence reporting, not ad-hoc exploration

For most D2C brands under $20M revenue, the practical path is: build the initial cohort table manually in Google Sheets from a Shopify order export to understand the methodology, then move to an automated tool once the analysis becomes part of the weekly operating rhythm.

The manual build forces understanding of what the numbers mean. Operators who trust automated cohort reports without having built a table manually often misread the diagonal blank cells, confuse cohort retention with overall retention rates, or miss the distinction between customer count retention and revenue retention.

How Fairview Automates Cohort Analysis for DTC Operators

Fairview's operating intelligence platform connects Shopify order data, ad platform data (Meta, Google, TikTok), and accounting data (QuickBooks or Xero) to compute cohort retention and revenue cohorts automatically — updated weekly without manual intervention.

The weekly operating report surfaces:

  • Acquisition cohort retention table for the trailing 12 months — updated each week as new orders come in
  • Channel-level cohort breakdown showing M1, M3, and M6 retention by paid social, paid search, organic, and email
  • Revenue cohort table showing cumulative revenue per customer for each monthly cohort
  • LTV by channel calculated from cohort revenue data, compared against channel CAC to produce a revenue-per-acquisition-dollar metric
  • Alert when any cohort's M1 retention drops more than 5 percentage points below the trailing 3-month average — the early warning signal for a retention problem before it compounds

The practical outcome for operators: the conversation about customer acquisition changes from "ROAS is 3.2x on Meta" to "Meta cohorts are retaining at 24% at M1 vs. 38% for organic search — we are paying a 40% premium to acquire lower-LTV customers." That reframe changes budget allocation decisions in a measurable way.

For the broader framework on how cohort analysis fits into weekly operating reviews, see the guide on how to run a weekly business review. For how cohort data connects to margin tracking at the channel level, see the operating intelligence for ecommerce brands guide.

Cohort analysis — automated weekly

Stop Building Cohort Tables by Hand

Connect Shopify and your ad platforms. Fairview rebuilds your cohort retention and revenue tables every week — with channel-level breakdowns and LTV calculations included.

Key Takeaways

  • Cohort analysis groups customers by first purchase date and tracks repeat purchase rates over time — the output is a retention heatmap that shows whether customer quality is improving or declining
  • The three cohort types that matter for ecommerce: acquisition cohorts (when did they first buy?), behavioral cohorts (what did they do first?), and revenue cohorts (how much have they spent over time?)
  • M1 retention — the percentage of first-time buyers who purchase again within 30 days — is the single most important number in the cohort table
  • Strong D2C M1 retention runs 38–55%; average is 22–37%; below 22% is a signal that the post-purchase experience needs intervention
  • Channel-level cohort analysis often reveals that low-CAC channels generate lower-LTV customers — a finding that changes budget allocation when accounted for properly
  • Revenue cohorts — cumulative revenue per cohort member over time — are the direct input to LTV calculation and the foundation of CAC justification models
  • The six actions cohort data drives: improving post-purchase sequences, launching win-back campaigns, diagnosing anomaly cohorts, reallocating channel budget, shifting acquisition creative to hero products, and fixing upsell sequencing
  • Build the first cohort table manually to understand the methodology, then automate once it becomes part of the weekly operating cadence
How do you build a cohort table for ecommerce?

To build a cohort table: export all orders with customer ID, order date, and revenue. Identify each customer's first purchase date and assign them to a monthly cohort. For each cohort, calculate the percentage of customers who made a purchase in month 0, month 1, month 2, and so on. Plot cohorts as rows and time periods as columns. Color cells by retention rate to create a heatmap. The result shows your baseline retention curve and how it shifts over time.

What is a good retention rate for ecommerce cohorts?

For most ecommerce brands, month-1 retention (percentage of first-time buyers who purchase again within 30 days) runs 22–40%. Month-3 retention typically falls to 15–28%. Month-6 retention for strong brands is 12–22%. These numbers vary significantly by category — consumables and subscription-model brands see materially higher cohort retention than one-time purchase categories like furniture or electronics.

Which tools do ecommerce brands use for cohort analysis?

The most common tools are: Google Analytics 4 (built-in cohort report), Shopify analytics (basic cohort view), Excel or Google Sheets (manual cohort tables from exported orders), Klaviyo (email-focused cohort segmentation), and operating intelligence platforms like Fairview that automate cohort tracking across Shopify, ad platforms, and accounting software. The right tool depends on your data volume and the depth of analysis required.

What is the difference between acquisition cohort and behavioral cohort analysis?

An acquisition cohort groups customers by when they first purchased. A behavioral cohort groups customers by what action they took — for example, all customers who used a discount code on their first order, or all customers who bought a specific product category. Acquisition cohorts show macro retention trends over time. Behavioral cohorts reveal which actions or products correlate with higher or lower lifetime value.

How often should ecommerce brands run cohort analysis?

Monthly cohort tracking is the standard operating cadence. Each month, a new cohort enters the table. Reviewing the cohort table monthly lets operators spot when a specific acquisition period underperforms — often caused by a change in ad creative, a new discount strategy, or a product quality issue that only became visible at month 2 or 3. Quarterly deep-dives on channel-level cohort performance are also valuable for budget planning.

How does cohort analysis connect to customer lifetime value?

Cohort analysis is the foundation of LTV calculation. The retention curve from your cohort table directly determines LTV: a cohort that retains 40% at month 1 and 25% at month 3 generates substantially more lifetime revenue than one retaining 20% and 12% at the same intervals. By tracking cohort revenue — not just counts — operators can calculate average revenue per customer per month across the cohort lifecycle and build a data-grounded LTV model.

Fairview · Free for 14 days

Turn this into action — automatically.

Connect your CRM, finance, and ad data. Fairview surfaces margin leaks, pipeline risk, and next-best actions every week.

No credit card · Setup in under 10 minutes

Frequently asked questions

What is cohort analysis in ecommerce?

Cohort analysis in ecommerce groups customers who share a common starting event — most often their first purchase date — and tracks how that group behaves over time. The output is a cohort retention table showing what percentage of each monthly cohort returned to purchase in month 1, month 2, month 3, and beyond. It answers the question: are the customers we acquire getting better or worse at returning?

Stop reading. Start making decisions.

Connect your stack, see your operating picture, act on what matters. First source live in 10 minutes.