Experiment results
Hedgehog experimenting
Experiments

Test changes with statistical significance

Experiments is one of the tools that makes your product self-driving: the evaluation that proves a change actually worked. Built to natively work with product analytics, session replay, feature flags, and surveys.

Get started - free

Install with AI in a single prompt

Paste into your terminal or code editor and make AI do the work.

Learn more

MCPWatch a demoTalk to a human

What does it do?

Hedgehog experimenting

Experiments let you run A/B, A/B/n, holdout, fake door, and redirect tests with statistical significance. Create an experiment (which creates a feature flag), pick primary and secondary metrics, target cohorts or geographies, then launch variants. Bayesian and frequentist engines tell you what won – and you can watch session replays for each variant when you need the why.

Who is it for?

Experiments is used across teams depending on your role.

Role
Use cases
Product Engineers
Ship a change behind a flag, run an A/B test, and roll out the winner without a separate release pipeline
Product Managers
Validate onboarding, pricing, or UI changes with primary and secondary metrics before committing
Growth Engineers
Target cohorts or geographies, run multivariate tests, and watch session replays for each variant
Data Scientists
Run Bayesian or frequentist analysis with shared metrics, holdouts, and warehouse-backed metrics
B2B product teams
Run group-level experiments so everyone at a company sees the same variant

How do I use it?

There are a few ways to explore Experiments.

Run experiments from your editor

Create A/B tests, check statistical significance, and manage the full experiment lifecycle from Cursor, Claude Code, VS Code, or any MCP-compatible agent.

Create experiments alongside your code
Set up an A/B test for a feature you're building without leaving your editor.
Check results before shipping
Ask "what are the results of the checkout experiment?" to decide whether to merge.
Manage experiment lifecycle
Update targeting, adjust traffic splits, or archive completed experiments.
Validate implementation
Check that you correctly configured your feature flag before launching an experiment.

Install the PostHog MCP

Learn more
npx @posthog/wizard mcp add

Supports Next.js, React, Python, and

Top features

Choose the right metric for your goal and track side effects across your product.

Supports conversion funnels, count-based trends, value-based metrics, retention metrics, and ratio metrics

Funnel metrics
Track conversion rates across multi-step journeys, like signup flows or checkout.
Count & value metrics
Measure totals such as pageviews or clicks, or capture values like revenue, order size, or time spent.
Ratio metrics
Test ratios such as percentage of positive feedback to capture deeper insights.
Primary & secondary metrics
Monitor main goals while watching for negative side effects
Shared metrics library
Create reusable metrics across experiments for consistency and easy experiment setup.
Experiment results

AI prompts

Ask PostHog AI to set up experiments, read the results, and ship the winner. Works in PostHog AI (in-app chat), PostHog Desktop (our AI code editor), and in your product editor (using the MCP). Already signed in? Click a prompt to try it.

Ship winnerexperiment-ship-variant

Works with other PostHog tools

Use Experiments with these other PostHog apps to maximize shareholder value.

Works with...

  • Product Analytics

    Run analysis based on the value of a test, or build a cohort of users from a test variant

  • Session Replay

    Watch recordings of users in a variant to discover nuances in why they did or didn't complete the goal

  • Feature Flags

    Make changes to the feature flag the experiment uses - including JSON payload for each variant

Changelog

Recent updates from the Experiments Team.

July 2026(2)

  • Jul 24

    Metric markers in Experiment replays

    Filter Experiment recordings to sessions where selected metric events fired, then jump straight to those moments in the player. Metric…

  • Jul 24

    Stable results after re-exposure

    Experiment maturity and mean or ratio metrics now anchor to each person's first exposure. Re-evaluating a flag no longer shifts that window…

May 2026(3)

April 2026(1)

March 2026(3)

  • Mar 27

    CUPED variance reduction

    Experiments now supports CUPED - a statistical method that cuts experiment variance by 20–40%. Same data, sharper results.

  • Mar 27

    Copy experiments across projects

    Copy Experiments and early access features between projects. Start from something that already works.

  • Mar 5

    Launch experiments without metrics

    Experiments can now be created and launched without metrics. Roll out variants and start gathering event data right away. Metrics define…

February 2026(3)

  • Feb 12

    Better metric error messages

    When an Experiment metric fails, you now get clear error messages with actionable options: retry the metric, report the issue to support,…

  • Feb 12

    Replay summaries for Experiments

    Experiments can now summarize session replays related to your experiment results. Get qualitative feedback to understand the story behind…

  • Feb 6

    Metric breakdowns

    Now you can break down your experiment results by event properties. Click on the breakdowns button in the bottom right corner of your…

Questions?

Answers

There are a few ways you can get answers to specific questions about Experiments.

  1. Check the docs

    We have an entire docs-wizard dedicated to docs gardening.

  2. Search the community forums

    With over 100 discussions about Experiments, there's a good chance your answer is already answered!

  3. Ask PostHog AI

    It's an incredibly useful AI chat that understands the product, docs, community questions, our codebase, GitHub issues, and industry knowledge.

  4. Talk to a human

    Dedicated humans are standing by and ready to assist. Best for questions about volume pricing, terms, and sexy legal stuff.

Recent discussions

Feature comparison

Optimizely
compare
Amplitude
compare
VWO
Statsig
compare
Funnel metrics
Track conversion rates across multi-step journeys, like signup flows or checkout
Count and value metrics
Measure totals such as pageviews or clicks, or capture values like revenue, order size, or time spent
Ratio metrics
Test ratios such as percentage of positive feedback to capture deeper insights
Custom goals
Define your own goals and metrics to track
Secondary metrics
Monitor impact on unrelated metrics
Shared metrics library
Create reusable metrics across experiments for consistency and easy experiment setup
Experiment analysis
Analyze results of A/B tests
No-code experiments
Modify your website and run experiments without writing code
Beta
Split testing
Split participants into groups
Recommended run time
Automatically calculate the recommended run time and sample size
Dynamic cohorts
Add new users to an experiment automatically by setting a user property
Native goal tracking
Track impact on goals without external sources
Namespacing
Avoid conflicts by assigning all users to a namespace
Visual editor
Create and edit experiments in your app
Beta
Supported tests
Run a variety of tests depending on your needs
A/B testing
Compare two versions of a feature or flow using count, value, funnel, or ratio metrics
A/A testing
Test identical variants to validate your setup and ensure results are not biased by random chance
A/B/N testing
Run experiments with three or more variants to quickly identify the best-performing option
Data warehouse experiments
Run A/B tests natively on data in your existing warehouse
Beta
Fake door testing
Measure interest in a potential feature by exposing users to a "coming soon" entry point before building it
Holdout testing
Reserve a group of users who do not see any changes, so you can measure long-term impact against a true baseline
Multi-armed bandit
Optimize tests automatically by allocating traffic to the best performing variant
Enterprise
Pro
Mutually exclusive experiments
Isolate user groups for simultaneous, independent experiments
Enterprise
Redirect testing
Send users to different versions of a page or flow to test changes at the navigation level
Targeting
Precisely target who sees each variant
Cohort integration
Target specific user segments or behavioral cohorts
Geographic targeting
Limit experiments to certain countries or regions to account for local differences
Group-level experiments
Run tests at the organization, account, or team level – ideal for B2B products
Holdouts
Set aside a random group of users who never see the change, giving you a clean baseline for long-term measurement
Exclusion rules
Exclude specific users, cohorts, or properties from experiments
Implementation
Build on feature flags with developer-friendly tooling
Feature flag foundation
Experiments run on PostHog's battle-tested feature flag infrastructure, with full support across all major SDKs
JSON payloads
Pass structured data to variants, letting you dynamically configure and change user experiences without redeploys
Multivariate (A/B/n) testing
Test multiple variables simultaneously to find optimal combinations
API access
Evaluate experiments programmatically using PostHog API
Analysis
Measure results with statistical rigor
Statistical significance
Automatic calculation of statistical significance with configurable confidence levels
Results visualization
Clear visualizations of experiment results with winners and losers highlighted
Side effect monitoring
Track secondary metrics to catch unintended consequences
Statistics engine
How the results of an experiment are calculated
Bayesian or Frequentist
Frequentist with sequential testing
Frequentist default, Bayesian available
Bayesian
Bayesian, Frequentist, or Sequential with Bonferroni correction
Platforms
Run experiments across all major platforms
Web experiments
Run experiments on your website or app
Mobile experiments
Supports Android, iOS, React Native, and Flutter

Install

Built on feature flags – SDKs for web, mobile, and backend, plus no-code platforms.

Get started – free

No credit card required. You get the first 1,000,000 requests free every month, then pricing starts at $0.0001/request and reduces with volume.

Install with AI

Run this command in your terminal or AI editor.
npx -y @posthog/wizard@latest

Supports Next.js, React, Python, and

Install without AI

Sign up for a free account and follow the install instructions for your stack.

Get started - free