Skip to content
πŸ› οΈToolsShed

Percentile & Z-Score Calculator

Calculate percentile rank, Z-score, and normal distribution probability for a data set.

About this tool

Percentile and Z-score are fundamental statistical measures that help you understand where a data point stands within a distribution. A percentile tells you what percentage of the data falls below a given value, while a Z-score measures how many standard deviations away from the mean a value is. These concepts are essential in education (standardized test scores), health (growth charts), finance (investment performance), and quality control.

To use this calculator, enter your dataset values separated by commas, then specify the data point for which you want to find the percentile rank and Z-score. The tool will automatically compute the mean, standard deviation, and percentile rank, then display how the value compares to the normal distribution. You can also input a Z-score directly to see what percentile it corresponds to, making it easy to understand test scores, clinical measurements, or any standardized metric.

This tool assumes your data follows a roughly normal distribution for accurate Z-score interpretation. It uses the standard formula for percentile rank and the standard normal distribution table for probability values. Whether you're analyzing academic performance, medical test results, or manufacturing tolerances, this calculator provides quick insight into the statistical significance of any data point.

Frequently Asked Questions

Code Implementation

def percentile_rank(data: list[float], value: float) -> float:
    """Calculate the percentile rank of a value in a dataset."""
    n = len(data)
    if n == 0:
        return 0.0
    count_below = sum(1 for x in data if x < value)
    return (count_below / n) * 100

def percentile_value(data: list[float], p: float) -> float:
    """Find the value at the p-th percentile (0-100)."""
    if not data:
        return 0.0
    sorted_data = sorted(data)
    index = (p / 100) * (len(sorted_data) - 1)
    lower = int(index)
    upper = lower + 1
    if upper >= len(sorted_data):
        return sorted_data[-1]
    return sorted_data[lower] + (index - lower) * (sorted_data[upper] - sorted_data[lower])

data = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
print(percentile_rank(data, 75))   # 70.0
print(percentile_value(data, 25))  # 32.5

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.