StatGardenREF. DESK
Calculators/Statistics/P-Hat (Sample Proportion) Calculator
Statistics

P-Hat (Sample Proportion) Calculator

Sample proportion p-hat from a count of successes and a sample size, the standard notation used before a margin of error or confidence interval.

Published 25 August 2026

What this calculator does

P-hat, written p̂, is the standard statistical symbol for a sample proportion: the share of a sample that has some characteristic or outcome, calculated as the number of successes divided by the sample size. If 68 out of 200 people surveyed said yes to a question, p̂ is 68 ÷ 200, or 34%.

The little hat over the p is not decorative. In statistics, a hat over a symbol means "this is an estimate calculated from sample data," as opposed to p on its own, which usually denotes the true, unknown proportion in the entire population. P-hat is what you actually observe; p is what you are usually trying to estimate.

The formula

Formulap̂ = x / n, where x is the number of successes and n is the sample size

Divide the number of successes by the sample size: p̂ = x ÷ n. The calculator also shows the standard error of p̂, √(p̂(1−p̂)/n), which measures how much p̂ would be expected to vary from sample to sample of the same size, and is the building block for a margin of error or confidence interval around it.

TermMeaning
p̂ (p-hat)The sample proportion: the number of successes divided by the sample size, x ÷ n.
xThe number of successes, or the count of the sample that has the characteristic being measured.
nThe total sample size: the number of people, items or trials observed.
Standard error of p̂A measure of how much p̂ would typically vary if the same survey or experiment were repeated with a new sample of the same size.

The inputs explained

FieldWhat to enter
Number of successesThe number of successes in the sample: how many said yes, tested positive, or otherwise had the outcome you are counting.
Sample sizeThe total number of people, items or trials in the sample, including both successes and non-successes.

When to use it

Summarising a survey result

A survey of 200 people where 68 gave a particular answer is most naturally reported as p̂ = 34%, the standard way to express what fraction of a sample fell into a category.

Setting up a hypothesis test or confidence interval

p̂ is the starting input for a proportion-based hypothesis test or confidence interval; this calculator gets that single number right before it feeds into a more involved calculation.

Comparing two samples informally

Calculating p̂ separately for two different groups gives a quick, comparable figure, though a formal comparison (like a relative risk or a two-proportion test) is needed to say whether any difference is statistically meaningful.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How p-hat changes with the number of successes

A fixed sample of 200, with a range of success counts.

Sample size fixed at 200
Successes (x)Sample proportion (p̂)Standard error of p̂
2010.0%0.0212
5025.0%0.0306
6834.0%0.0335
10050.0%0.0354
15075.0%0.0306
18090.0%0.0212
The standard error is largest when p̂ is near 50% and smallest when p̂ is close to 0% or 100%, which is why the standard error at x=100 (p̂=50%) is higher than at either x=20 or x=180.

How p-hat changes with sample size

A fixed 68 successes, spread across a range of sample sizes.

Successes fixed at 68
Sample size (n)Sample proportion (p̂)Standard error of p̂
10068.0%0.0466
15045.3%0.0406
20034.0%0.0335
30022.7%0.0242
50013.6%0.0153
10006.80%0.0080
The same 68 successes produce a smaller p̂ as the sample size grows, since the same count is now a smaller share of a bigger total, and the standard error shrinks too as the larger sample gives a more precise estimate.

Questions

What does the p hat symbol mean?

p̂ (p with a hat, or circumflex, over it) denotes a sample proportion, an estimate calculated from actual observed data. It is distinguished from plain p, which usually refers to the true, generally unknown, proportion in the whole population.

Is p-hat the same as a percentage?

Yes, expressed as a decimal or fraction rather than a percentage: p̂ = 0.34 is the same thing as 34%. Statistical formulas usually work with the decimal form, but the two are interchangeable.

What is p-hat used for?

It is the starting point for most statistics involving proportions: confidence intervals, margins of error, and hypothesis tests that compare a sample proportion against a hypothesised value or against another sample. See the margin of error calculator for the next step.

Why does the standard error use p̂ instead of the true population proportion?

Because the true population proportion is usually exactly what you are trying to estimate and do not know. Using p̂ in its own standard-error formula is standard practice, since it is the best available estimate at that point in the calculation.

To turn p̂ into a margin of error or confidence interval at a chosen confidence level, use the margin of error calculator.