Pricing
Home/Free tools/Sample size calculator
Updated November 24, 2026

Sample size calculator

Visitors per variant and the days an A/B test needs to detect an effect

  • Free, no account needed
  • Runs in your browser: nothing you type is sent anywhere

What the test should detect

%

How the current version converts now

Effect as
%

Share of the baseline: 20% turns 5% into 6%

How sure the answer should be

Confidence level
Statistical power

Test duration, optional

Everyone entering the test each day, across all variants

Including the original: 2 for a simple A/B test

Visitors per variant

8,158

Each variant needs this many before you read the result

Total visitors
16,316
Test duration
17 days
In whole weeks
3 weeks
Baseline rate
5%
Rate to detect
6%
Absolute difference
+1 pp
Relative difference
+20%

Two-sided two-proportion z-test at 95% confidence and 80% power, sized for an increase over the baseline. pp means percentage points.

What sample size means in an A/B test

An A/B test needs enough visitors in each variant to tell a real difference from chance. How many depends on three choices: the smallest effect worth detecting, how sure you want to be that a winner is not a fluke (the confidence level) and how likely the test should be to find a real effect of that size (the power).

Small effects need many visitors. The sample grows with one over the squared difference, so halving the effect you want to detect roughly quadruples the visitors you need.

The sample size formula

This is the standard formula for comparing two proportions with a two-sided z-test, the same test the A/B test calculator runs. The significance part uses the average of both rates, as the test does when it assumes there is no difference; the power part uses each rate’s own variance.

The calculator sizes the test for an increase of the size you enter. The duration is the total sample divided by the visitors who enter the test each day, rounded up to whole days.

p₁ = baseline rate,  p₂ = rate to detect,  p̄ = (p₁ + p₂) ÷ 2
n = (zα × √(2 × p̄ × (1 − p̄)) + zβ × √(p₁ × (1 − p₁) + p₂ × (1 − p₂)))² ÷ (p₂ − p₁)²
zα = 1.645 (90%), 1.960 (95%), 2.576 (99%), two-sided
zβ = 0.842 (80% power), 1.282 (90% power)
Days = n × variants ÷ visitors per day, rounded up

Baseline 5%, relative effect 20%: p₂ = 6%, p̄ = 0.055
95% confidence, 80% power:
n = (1.960 × √0.10395 + 0.842 × √0.1039)² ÷ 0.01²
  = (0.6319 + 0.2713)² ÷ 0.0001 = 8,158 per variant
2 variants at 1,000 visitors a day: 16,316 ÷ 1,000 = 16.3, so 17 days

Planning tests with clients

Agree the baseline, the smallest effect that would change a decision and the confidence level with the client before the test starts. If the answer is months of traffic, test a bolder change, a page with more visitors or a step closer to the sale, rather than lowering the bar once the test is running.

  • Take the baseline from the same page over a recent, normal period
  • Choose the minimum detectable effect from what would be worth acting on, not from the lift you hope for
  • Round the duration up to whole weeks, so every day of the week is in the sample
  • Do not stop early because the result looks good; read it once each variant has its sample
  • With more than two variants, every comparison with the original adds a chance of a false winner, so consider a stricter confidence level

A tool by Lyniti

Plan client tests where the work is

Lyniti keeps agency projects, client communication, files, approvals, invoices and bookkeeping in one connected workspace, so a test plan, its approval and the results sit with the project.

See Lyniti for agencies →

Related tools

All free tools →
  • A/B test calculator→Whether B beats A: uplift, p-value and confidence interval for two versions
  • Conversion rate calculator→Conversion rate and value per visitor, or conversions for a target rate
  • ROI calculator→Marketing ROI, ROAS and break-even ROAS from spend, revenue and margin

Embed this tool

Add it to your own site or help centre. It runs in your visitors’ browsers, like here, and links back to this page.

<iframe src="https://lyniti.com/tools/sample-size-calculator/embed" title="Sample size calculator" width="100%" height="760" style="border:0;max-width:100%" loading="lazy"></iframe>

Frequently asked

questions

What is a minimum detectable effect?

The smallest real difference the test is built to find reliably. With a 5% baseline, a relative effect of 20% and an absolute effect of 1 percentage point mean the same thing: a change to 6%.

What does 80% power mean?

If the variant really is better by the minimum detectable effect, the test shows a significant result 80% of the time and misses it the other 20%. 90% power misses less often but needs more visitors.

Why does a lower baseline need more visitors?

The same relative lift is a smaller absolute difference on a low baseline: 20% of 2% is 0.4 percentage points, 20% of 10% is 2 points. A smaller difference needs a larger sample to stand out from chance.

How long should an A/B test run?

Until every variant reaches its sample size, and in whole weeks so weekdays and weekends are both covered. Enter your daily visitors above to turn the sample into days.

Projects, clients and finance in one workspace

Lyniti helps agencies, consultancies, studios, and service teams manage projects, clients, approvals, invoices, bookkeeping, and finance in one workspace.

See it in actionSee it in actionSee Pricing

The all-in-one business collaboration platform that replaces multiple tools, streamlines workflows, and reduces costs for modern teams.

Product

  • Features
  • Pricing
  • Documentation

Features

  • Chat
  • Bookkeeping
  • Double-entry
  • Finances
  • Financial Approvals
  • Invoices
  • Whiteboard
  • Files
  • Meet
  • Tasks
  • Calendar
  • CRM

Solutions

  • Agencies
  • Operations
  • Finance & Admin
  • Projects
  • Freelancers
  • Governance
  • Teams + Finance
  • Projects + Bookkeeping
  • Design studios
  • Consultants
  • Remote teams
  • Projects + Invoicing
  • Client Portal
  • Projects + Approvals

Compare

  • vs 17hats
  • vs Airtable
  • vs Asana
  • vs Basecamp
  • vs ClickUp
  • vs Discord
  • vs Dropbox
  • vs Google Workspace
  • vs Jira
  • vs Linear
  • vs Microsoft Teams
  • vs Miro
  • vs monday.com
  • vs Notion
  • vs Plutio
  • vs QuickBooks
  • vs Rock
  • vs Salesforce
  • vs Slack
  • vs Smartsheet
  • vs Trello
  • vs Wimi
  • vs Wrike

Free tools

  • Invoice generator
  • Quote generator
  • VAT calculator
  • Profit margin calculator
  • Hourly rate calculator
  • Gantt chart maker
  • Online whiteboard
  • Time zone meeting planner
  • UTM builder
  • Email signature generator
  • Image resizer
  • Color contrast checker
  • QR code generator

Company

  • About
  • Blog
  • support@lyniti.com
  • Service status

Legal

  • Trust Center
  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Data Processing Agreement
  • Imprint

© 2026 Lyniti. All rights reserved.

Made with love and Lyniti