p-hat Calculator — Sample Proportion & Confidence Interval
Calculate p̂ (the sample proportion), its standard error, margin of error, and confidence interval. Enter the number of successes, the sample size, and choose a confidence level to get a complete picture of your proportion estimate.
Confidence level
Proportion of successes in the sample
- 1
Count of successes
x = 45 = 45 - 2
Sample size
n = 100 = 100 - 3
Sample proportion p̂
x ÷ n = 45 ÷ 100 = 0.4500Fraction of the sample with the outcome of interest.
How does this calculator work?
p̂ = x / n (successes ÷ sample size). Standard error = √(p̂(1 − p̂) / n). The 95% CI is p̂ ± 1.96 × SE. For 50 successes in 100 trials: p̂ = 0.50, SE = 0.05, 95% CI ≈ [0.402, 0.598]. Requires np̂ ≥ 5 and n(1 − p̂) ≥ 5 for validity.
Formula
How this is calculated
The sample proportion p̂ (p-hat) is the fraction of a sample with a particular characteristic: p̂ = x / n, where x is the number of successes and n is the total sample size. It is the most natural point estimate of the true population proportion p.
The standard error of p̂ quantifies sampling variability: SE = √(p̂(1 − p̂) / n). Larger samples or proportions close to 0 or 1 give smaller standard errors. The confidence interval (CI) extends z × SE on either side of p̂, where z is the critical value for the chosen confidence level (z = 1.645 for 90%, 1.96 for 95%, 2.576 for 99%). The CI is interpreted as: if you repeated the sampling process many times, approximately 95% (or 90%/99%) of the intervals constructed this way would contain the true population proportion.
This calculator uses the Wald (normal approximation) interval, which requires the sample to be large enough that both x ≥ 5 and n − x ≥ 5. For small samples or extreme proportions (close to 0 or 1), the Wilson or Clopper-Pearson (exact) methods are more reliable — a warning is shown when the approximation condition is not met.
Frequently asked questions
p (without a hat) is the true population proportion — usually unknown. p̂ (p-hat) is the sample proportion, an estimate of p computed from your data. As sample size grows, p̂ converges to p by the law of large numbers.
It means that if the survey or experiment were repeated many times with the same sample size, 95% of the confidence intervals constructed would contain the true population proportion. It does not mean there is a 95% chance the true proportion lies in this specific interval.
The Wald CI (used here) requires both x ≥ 5 and n − x ≥ 5 (equivalently, np̂ ≥ 5 and n(1 − p̂) ≥ 5). For rare events or small samples, use the Wilson or exact (Clopper-Pearson) interval instead.
Also known as
TG we-Calculate Editorial Team. (2026). p-hat Calculator — Sample Proportion & Confidence Interval [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/p-hat-calculator
TG we-Calculate Editorial Team. "p-hat Calculator — Sample Proportion & Confidence Interval." TG we-Calculate. 2026. https://we-calculate.com/calculator/p-hat-calculator.
TG we-Calculate Editorial Team, "p-hat Calculator — Sample Proportion & Confidence Interval," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/p-hat-calculator
@misc{wecalculate_p_hat_calculator, title = {p-hat Calculator — Sample Proportion & Confidence Interval}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/p-hat-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
