TL;DR

  • A cohort is a group of users who share a specific behavior or property at a specific point in time. "Users who signed up in March" is a cohort. "Users who completed activation within 24 hours of signup" is a cohort.
  • PostHog has two cohort types: dynamic cohorts (automatically updating — users enter and exit based on their behavior) and static cohorts (snapshot in time — the membership doesn't change once created).
  • The 3 most useful cohort analyses in B2B SaaS: retention cohorts (which signup cohorts retain vs. decay), behavioral cohorts (which early behaviors predict long-term retention), and at-risk cohorts (which active users are showing churn signals).
  • Once you have cohorts, you can: filter any insight (trends, funnels, retention) by cohort, target feature flags and experiments to specific cohorts, and export cohort membership for CS outreach.
  • The biggest cohort mistake: building cohorts that describe what happened instead of predicting what will happen. "Users who churned" is backward-looking. "Users whose engagement velocity dropped 70% in the last 14 days" is forward-looking.

What a Cohort Actually Does

A cohort in PostHog is a named filter. Instead of typing the same conditions into every insight, you save it as a cohort and reuse it everywhere. PostHog's cohort system lets you segment users by behavior, properties, or event sequences.

PostHog supports both static cohorts (fixed membership at creation time) and dynamic cohorts (automatically updating as users enter and exit based on their behavior).

Cohorts are the foundation of:

  • Retention analysis — which cohorts retain vs. decay?
  • Experiment targeting — show this experiment only to users in Cohort X
  • Feature flag targeting — roll out this feature only to Cohort Y
  • Churn prediction — which cohorts are showing churn signals?
  • CS outreach — export the "at-risk" cohort for your CSM team to act on

How to Create Your First Cohort

Step 1: Open the Cohorts Page

Click Cohorts in the left navigation, then New cohort.

Step 2: Define the Conditions

You can build cohorts from:

Event-based conditions:

  • "Users who completed signup_completed in the last 30 days"
  • "Users who completed activation_completed within 24 hours of signup_completed"

Property-based conditions:

  • "Users where plan = 'pro'"
  • "Users where signup_source = 'organic'"

Combination conditions:

  • "Users who completed signup_completed AND where plan = 'pro' AND who have NOT completed activation_completed"

Step 3: Choose Dynamic or Static

  • Dynamic: The cohort updates automatically. Users enter when they meet the conditions and exit when they no longer do. Best for ongoing segments ("active Pro users").
  • Static: The cohort is a snapshot. Membership is frozen at creation time. Best for retention analysis ("users who signed up in March").

Step 4: Save and Use

Once saved, the cohort appears in the cohort dropdown of every insight, experiment, and feature flag. You can manage cohorts programmatically via the PostHog cohorts API, which supports creating, updating, and deleting cohorts with JSON payloads.

The 5 Cohorts Every B2B SaaS Team Needs

The 5 essential PostHog cohorts for B2B SaaS
The Core Cohort Stack: Activation, Power Users, and At-Risk segments.

1. Activation Cohort

Definition: Users who completed your activation event within 24 hours of signup.

Why it matters: This cohort tells you how many users are reaching value quickly. Users who activate within 24 hours typically retain at 2–3× the rate of users who don't.

How to build it:

  • Event: activation_completed
  • Time window: within 24 hours of signup_completed

2. Power User Cohort

Definition: Users who used 3+ core features in the last 30 days.

Why it matters: Power users are your best source of product feedback, case studies, and referrals. This cohort tells you who's getting the most value from your product.

How to build it:

  • Event: core_feature_used at least 3 times in the last 30 days
  • OR: 3 distinct feature_first_used events in the last 30 days

3. Trial-to-Paid Cohort

Definition: Trial users who converted to paid within their trial period.

Why it matters: This cohort reveals the behaviors that predict trial conversion. Compare what trial converters did differently vs. non-converters, and optimize your trial onboarding around those behaviors.

How to build it:

  • Event: trial_started
  • Followed by: subscription_created within trial period (14 or 30 days)

4. At-Risk Cohort

Definition: Active users whose engagement velocity dropped significantly in the last 14 days.

Why it matters: This is your early warning system. Users whose usage is declining are the most likely to churn. Reaching out before they cancel is the most effective retention intervention you can make.

How to build it:

  • Event: core_feature_used at least once in the last 30 days (baseline)
  • AND event: core_feature_used at 50%+ lower frequency in the last 14 days vs. prior 14 days

Note: This is complex to build in the UI. Use HogQL for the velocity calculation, then save the results as a cohort. For how to use HogQL for complex cohort calculations, see our HogQL guide.

5. Trial-Expiring Cohort

Definition: Trial users whose trial expires in the next 7 days and have not yet subscribed.

Why it matters: This is your last-chance intervention list. A targeted email or CSM call to these users in their final trial days can significantly impact trial-to-paid conversion.

How to build it:

  • Event: trial_started 14 days ago (for 14-day trials)
  • AND NOT event: subscription_created

How to Use Cohorts in Insights

Once you've built a cohort, use it to filter any insight:

Filter a Funnel by Cohort

  1. Open your funnel insight
  2. Click Filter by cohort
  3. Select "Activated Pro Users"
  4. Compare funnel conversion of activated vs. non-activated users

For how to build funnels that answer business questions, see our funnels guide.

Filter Retention by Cohort

  1. Open a retention insight
  2. Filter by "Power Users" cohort
  3. See whether power users retain at a higher rate than the general population

Cohort-based retention analysis reveals whether specific user segments exhibit different retention patterns. PostHog's retention insights let you compare cohort retention curves across signup periods, plan types, and feature adoption — showing whether your product is getting stickier over time.

Compare Two Cohorts

  1. Create an insight (trends, funnels, or retention)
  2. Add a series for Cohort A
  3. Add a second series for Cohort B
  4. Compare the two lines

Cohort Retention Analysis: The Advanced Workflow

PostHog cohort retention analysis workflow
The Advanced Workflow: Turning cohort data into a forward-looking diagnostic tool.

Cohort retention analysis is one of the most powerful workflows in PostHog. Here's how to do it properly:

  1. Define your cohorts — create static cohorts for each signup period (weekly or monthly)
  2. Build retention insights — for each cohort, calculate what percentage of users returned in weeks 1, 2, 3, etc.
  3. Compare retention curves — overlay retention curves for different cohorts to spot trends
  4. Identify inflection points — if Week 4 retention drops from 40% to 25% between two cohorts, something changed in your product or onboarding
  5. Export and act — export the worst-performing cohort for qualitative analysis (session replay, user interviews)

This workflow turns cohort data from a retrospective metric into a forward-looking diagnostic tool. If your latest cohort's retention curve is below the previous cohort's curve, you have a regression — not a fluctuation.

40% → 25%

If Week 4 retention drops from 40% to 25% between two cohorts, something changed in your product or onboarding. This is the earliest signal you can detect that a release made things worse — before churn numbers confirm it.

Cohorts in Experiments and Feature Flags

Targeting Experiments by Cohort

When you create an experiment in PostHog, you can restrict it to a specific cohort:

  • Run the experiment only on "Pro Users" to test a Pro-specific feature
  • Run the experiment only on "At-Risk Users" to test a retention intervention

Targeting Feature Flags by Cohort

Roll out a feature only to a specific cohort:

  • Show the new onboarding flow only to "New Signups" cohort
  • Show the new pricing page only to "Free Trial Users" cohort

For the complete guide on how to use feature flags for controlled releases, see our feature flags tutorial.

Common Cohort Mistakes

Mistake 1: Building Backward-Looking Cohorts

"Users who churned" tells you who left. It doesn't tell you who's about to leave. Build forward-looking cohorts: engagement velocity drops, feature usage contraction, support ticket spikes.

Mistake 2: Static Cohorts for Dynamic Questions

Using a static cohort ("users who signed up in January") to filter a real-time dashboard means the cohort never updates. Use dynamic cohorts for ongoing monitoring and static cohorts for historical analysis.

Mistake 3: Too Many Cohorts

After 20+ cohorts, nobody knows which ones are actively used. Set a rule: every cohort must be used in at least one active dashboard, experiment, or feature flag. If it's not being used, delete it.

Mistake 4: Not Connecting Cohorts to Action

A cohort of "at-risk users" sitting in PostHog does nothing. Export it, send it to your CS team, and make it part of their Monday morning routine. A cohort of "power users" in a dashboard does nothing. Use it to target your next feature release and ask them for a testimonial. If your PostHog setup does not yet have the events to build these cohorts reliably, that is an instrumentation problem — one a PostHog consulting engagement addresses before any cohort work begins.

FAQ

What's the difference between a dynamic and static cohort?

Dynamic cohorts update automatically as user behavior changes. A user enters the "active users" cohort when they log in and exits when they stop logging in. Static cohorts are frozen snapshots — "users who signed up in March" will always contain exactly the users who signed up in March, regardless of their current behavior.

Can I export cohort members?

Yes. You can export cohort membership as a CSV file from the cohort page. This is useful for CS teams who want to reach out to specific user segments (e.g., "at-risk" cohort).

How often do dynamic cohorts update?

PostHog updates dynamic cohorts in near real-time. When a user's behavior changes, their cohort membership updates on the next insight load.

Can I use HogQL to build cohorts?

Yes. You can run a HogQL query to identify users matching complex criteria, then save the results as a cohort. This is the best approach for cohorts that require calculations the UI can't do (like engagement velocity). For the full HogQL tutorial, see our PostHog SQL guide.

What are the most useful cohort analyses for B2B SaaS?

The three most useful analyses are: retention cohorts (which signup cohorts retain vs. decay), behavioral cohorts (which early behaviors predict long-term retention), and at-risk cohorts (which active users are showing churn signals). Cohort retention analysis reveals whether specific user segments exhibit different retention patterns — for example, whether users who complete onboarding within 24 hours retain better than those who don't.

Sources

Free tool: Plot your retention curve against SaaS benchmarks → Cohort Retention Calculator

Jake McMahon

About the Author

Jake McMahon builds growth infrastructure for B2B SaaS companies — analytics, experimentation, and predictive modeling that turns product data into revenue decisions. He has implemented PostHog cohorts across multiple engagements and trained teams to build cohorts that predict churn, not just describe it. Book a diagnostic call to discuss your cohort strategy.

Next Step

Get Your Cohort Strategy Audited

We'll assess your current cohorts, tell you which ones predict churn vs. describe it, and build the 5 core cohorts your team needs.