Skip to content

One Proportion Z-Test Calculator

Use this one-proportion z-test calculator to test whether a sample proportion is different from a hypothesized population proportion. You can enter summary data using the number of successes and sample size, or switch to raw data and paste values such as Yes, No, Yes or 1, 0, 1.

After entering your data, choose the test type and significance level to get the sample proportion, z statistic, p-value, decision, conclusion, and step-by-step explanation. This calculator is useful when your outcome has two possible categories, such as yes/no, success/failure, pass/fail, defective/not defective, or support/do not support.

One Sample Proportion Test Calculator

Hypothesis Testing

Enter either the number of successes and sample size, or switch to raw data and paste values such as Yes, No, Yes or 1, 0, 1. Then enter the hypothesized proportion, choose the test type, and select the significance level.

Use summary data if you already know x and n. Use raw data if your observations are listed one by one.
Example: 56
Total number of observations.
Separate values using commas, spaces, or new lines. Example: Yes, No, Yes or 1, 0, 1.
The category counted as success. Example: Yes or 1.
Enter as a decimal. Example: 0.50.
Choose the alternative hypothesis direction.
Common value: 0.05.

Step-by-step explanation

Advertisement

Want to learn the theory behind the test? Read our one-sample proportion z-test guide.

How to Use the One Proportion Z-Test Calculator

This calculator allows you to conduct a one-sample proportion test either using summary data or raw data. If you already know the number of successes (x) and the total sample size (n), you should use the summary data option. However, if you have raw observations listed either as comma-separated text or numbers, use the raw data option.

If you have summary data and want to perform a one-proportion z-test using this calculator, follow these steps:

  1. Select Summary Data as the input type
  2. Enter the number of successes (x).
  3. Enter the sample size (n).
  4. Enter the hypothesized proportion (p0) as a decimal.
  5. Choose the test type (right-tailed, left-tailed, or two-tailed).
  6. Enter the significance level (α) as a decimal.
  7. Click the Calculate Z Test button.

However, if you’re working with raw data such as: Yes, No, Yes, Yes, No, Yes, No, Yes, where Yes is the success value, you can still perform a one-sample proportion test using this calculator. You only need to follow these simple steps:

  1. Select raw data as the input type
  2. Copy-paste the raw data into the input field
  3. Specify the success value either as text or as a number.
  4. Enter the hypothesized proportion (p0) as a decimal.
  5. Choose the test type (right-tailed, left-tailed, or two-tailed).
  6. Enter the significance level (α) as a decimal.
  7. Click the Calculate Z Test button.

The calculator will instantly perform the hypothesis test and return the z-test statistic, the p-value, the decision, and the conclusion. You’ll also see a clear, step-by-step explanation, showing you how the hypothesis test was conducted for your data.

Note. If the raw data is numeric, such as 1, 0, 1, 1, 0, 1, and 1 represents success, you should enter 1 as the success value. Otherwise, enter the text representing success, such as Yes, if working with textual data.

One Proportion Z-Test Formula Used by the Calculator

The calculator uses the following z-test statistic formula: z=p^p0p0(1p0)nz = \frac{\hat{p} – p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}}

Where:

  • p̂ is the sample proportion estimated using the formula, p̂ = x/n
  • p0​ is the hypothesized population proportion.
  • n is the sample size.

Tip. For a one-sample proportion test, the standard error is based on the hypothesized proportion p0​, not the sample proportion. This is why we use p0 in the denominator of the z-test statistic formula.

Example 1. One Proportion Z-Test Using Summary Data

Suppose a company claims that 65% of customers prefer its new product design. A researcher surveys 150 customers and finds that 108 prefer the new design. Test whether the true population proportion is different from 0.65 at the 0.05 significance level.

Solution

From the question, we know that:

  • The number of successes, x = 108
  • The total sample size, n = 150
  • The hypothesized proportion, p0 = 0.65
  • Significance level, α = 0.05
  • Test type is two-tailed since we want to test whether the population proportion is different.

Therefore, to perform the hypothesis using the calculator, enter the above parameters into the calculator, as follows:

InputValue
Input typeSummary data
Number of successes108
Sample size150
Hypothesized proportion0.65
Test typeTwo-tailed
Significance level0.05

On clicking the calculate button, the calculator will instantly return the following results:

OutputValue
Sample proportion: p̂ 0.72 (72%)
z statistic1.797434
p-value0.072267
DecisionBecause p = 0.072267 is greater than α = 0.05, we fail to reject the null hypothesis. 
Conclusion There is not enough evidence to conclude that the population proportion is different from 0.65.

Example 2. One Proportion Z-Test Using Raw Data

Suppose a teacher wants to test whether the pass rate in a short quiz is greater than 70%. The results for 25 students are shown below.

Pass, Pass, Fail, Pass, Pass,
Pass, Fail, Pass, Pass, Fail,
Pass, Pass, Pass, Pass, Fail,
Pass, Pass, Pass, Fail, Pass,
Pass, Pass, Fail, Pass, Pass

Perform the hypothesis at the 0.05 significance level.

Solution

From the question, we know that:

  • Hypothesized population proportion, p0 = 0.70
  • Test type is right-tailed since the teacher wants to test whether the pass rate is “greater.”

Therefore, to perform the hypothesis using the calculator, enter the parameters as shown in the table below.

InputValue
Input typeRaw data
Raw dataCopy-paste the raw data in the input field
Success valuePass
Hypothesized proportion0.70
Test typeRight-tailed
Significance level0.05

On clicking the calculate button, the calculator will produce the following outputs.

OutputValue
Sample proportion: p̂0.76 (76%)
z statistic0.654654
p-value0.256345
DecisionBecause p = 0.256345 is greater than α = 0.05, we fail to reject the null hypothesis.
ConclusionThere is not enough evidence to conclude that the population proportion is greater than 0.7.

Have you already calculated the z-test statistic and only need the p-value? Use our p-value from z calculator to quickly find the p-value for a left-tailed, right-tailed, or two-tailed z test.

When to Use the One-Proportion Z Test Calculator

This calculator is suitable when you want to test whether a sample proportion (p̂) is statistically different from a hypothesized population proportion (p0).

In other words, you can use the calculator when you have one sample and the outcome has only two categories (binary responses), such as:

  • Yes / No
  • Pass / Fail
  • Success / Failure
  • Defective / Not defective
  • Support / Do not support
  • 1 / 0

Examples of hypothesis tests you can perform with this calculator include:

  • The proportion of satisfied customers is different from 0.80.
  • The pass rate is greater than 0.70.
  • The defect rate is less than 0.05.
  • The proportion of voters supporting a proposal is different from 0.50.

One-Tailed vs Two-Tailed Test

Choose the test type based on your research question.

Test TypeAlternative HypothesisUse When
Two-tailed testH1: p ≠ p0​You want to test whether the proportion is different from the hypothesized value.
Left-tailed testH1: p < p0​You want to test whether the proportion is lower than the hypothesized value.
Right-tailed testH1: p > p0​You want to test whether the proportion is higher than the hypothesized value.

Note. Always choose the direction before calculating the result because the test direction affects the p-value and the final decision.

Requirements Checked by the Calculator

The calculator checks the normal approximation condition using: np0​≥10 and n(1−p0​)≥10

If both values are at least 10, the z approximation is usually reasonable. However, if one or both values are below 10, the calculator can still show the z-test result, but an exact binomial test may be a better choice.

You should also make sure that:

  • The data come from one sample.
  • The observations are independent.
  • The outcome has two categories.
  • The sample is reasonably representative of the population.

The calculator checks the numeric condition, but it cannot verify your study design.

Frequently Asked Questions

What is a one-proportion z-test calculator?

A one-proportion z-test calculator is an online tool used to perform a one-sample proportion test by comparing a sample proportion with a hypothesized population proportion. It gives the z statistic, p-value, decision, and conclusion.

What data do I need for this calculator?

This calculator allows you to enter either summary data or raw data. For summary data, enter the number of successes and sample size. However, for raw data, paste the individual observations and enter the value that should be counted as a success.

What is the success value in raw data mode?

The success value is the category the calculator should count as a success. For example, if your raw data are Pass, Fail, Pass, the success value would be Pass.

Should I enter 50% as 50 or 0.50?

Enter 50% as 0.50. Proportions should be entered as decimals between 0 and 1.

Can I use this calculator for Yes/No data?

Yes. Yes/No data are a common use case for a one-proportion z-test. In raw data mode, enter your Yes/No values and set the success value to the category you want to test, such as Yes.

What should I do if the normal approximation condition fails?

If np0​ or n(1−p0​) is below 10, the z approximation may not be reliable. In that case, an exact binomial test may be more appropriate.

Advertisement
Cite or Embed this Calculator

Copy a citation or embed code if you want to reference this calculator on another page.

Citation
Embed Code