Skip to main content
v2026.11,858 entries · CC-BY 4.0

How to Calculate Percentile From Rank (Formulas, Ties, Examples)

Convert a rank to a percentile rank with worked examples, the strict, midpoint and NIST conventions side by side, tie handling, and Excel, R and Python code.

Written and maintained by CASRAI Editorial Board

Last updated

A percentile rank is the percentage of a group that scores below a given value, with credit for ties. To go from a rank to a percentile you count how many members sit below the one you care about and divide by the group size N. The one thing that changes the answer is the convention: the most common one is percentile rank = (number below + 0.5 × number equal) / N × 100, and for rank 1 = best with no ties that becomes (N − R + 0.5) / N × 100.

Definition in one paragraph

A percentile rank describes where one observation sits inside a group. A percentile rank of 95 means the observation is at or above roughly 95 percent of the group, counting half of any tied scores as “below”. It is a position statistic, not a score: it says nothing about how far apart the values are. Related ideas include the percentile (the value that cuts off a given share of the data, see descriptive statistics) and the cumulative share drawn on an ogive; the percentile rank runs the other way, from a value to a share.

How to calculate percentile rank

Formula with every symbol explained

The midpoint convention, also given in the Wikipedia article on percentile rank and implemented as kind='mean' in SciPy, is:

PR = (B + 0.5 × E) / N × 100

  • PR is the percentile rank, from 0 to 100.
  • B is the number of values strictly below the score you are ranking.
  • E is the number of values equal to the score, including the score itself (so E is at least 1).
  • N is the total number of values in the group.

Two simpler variants differ only in how they treat the score itself and its ties. The strict version is PR = B / N × 100 (values strictly less than the score). The weak version is PR = (B + E) / N × 100 (values less than or equal to the score). SciPy documents these as kind='strict' and kind='weak' in scipy.stats.percentileofscore (documentation checked 2026-10-29).

Worked example with ties

Take five scores: 1, 2, 3, 3, 4, and find the percentile rank of the score 3.

  1. Count the values strictly below 3: the 1 and the 2, so B = 2.
  2. Count the values equal to 3: E = 2.
  3. N = 5.
  4. PR = (2 + 0.5 × 2) / 5 × 100 = 3 / 5 × 100 = 60.

Ties: why 3 can be 40, 60, 70 or 80

The same score gives four defensible answers depending on the tie rule. SciPy’s documentation shows exactly this example, and the arithmetic matches:

Rule Arithmetic Result
Strict (values below) 2 / 5 × 100 40
Mean (midpoint) (2 + 0.5 × 2) / 5 × 100 60
Weak (values at or below) 4 / 5 × 100 80
Rank (SciPy default) average of the percentage rankings of the tied scores 70

SciPy describes its default kind='rank' as averaging the percentage rankings of all matching scores. When you publish a percentile rank for data with ties, name the rule you used, because the numbers above are all correct under their own definitions.

How to calculate percentile from rank

Rank from the top versus the bottom

Rankings such as league tables, journal lists and grant scores usually put rank 1 at the best end. A percentile rank counts upward from the bottom, so you convert first. With R as the rank from the top (1 = best) and no ties, the number of values below you is N − R, and:

  • Strict: PR = (N − R) / N × 100.
  • Midpoint: PR = (N − R + 0.5) / N × 100.
  • Weak: PR = (N − R + 1) / N × 100.

If instead your rank i counts upward from the lowest value (1 = lowest), the midpoint version is (i − 0.5) / N × 100.

Do not confuse a high percentile rank with a “top X percent” label. Rank 3 of 50 is in the top 6 percent (3 / 50) and is at about the 95th percentile rank; the two numbers add to roughly 100, not to the same figure.

Worked example: rank 3 of 50

Suppose a group of N = 50 has no ties and a member is ranked third from the top (R = 3), so 47 values are below it.

  1. Strict: 47 / 50 × 100 = 94.0.
  2. Midpoint: (47 + 0.5) / 50 × 100 = 95.0.
  3. Weak: 48 / 50 × 100 = 96.0.
  4. NIST’s i / (N + 1): the ascending position is i = 48, so 48 / 51 = 0.941, about 94.1.

The NIST/SEMATECH e-Handbook of Statistical Methods, section 2.6.2 “Percentiles”, states that the percentile of the i-th ordered point of n points is i / (n + 1) (checked 2026-10-29). That is the convention behind its percentile estimation, where p(N + 1) is split into an integer part k and a fraction d. It differs from the count-based rules because it treats the N values as dividing the scale into N + 1 intervals.

The same ranks under each convention (N = 50)

Rank from top (R) Strict Midpoint NIST i/(N+1)
1 (best) 98.0 99.0 98.0
3 94.0 95.0 94.1
25 50.0 51.0 51.0
50 (lowest) 0.0 1.0 2.0

The strict rule can return exactly 0 for the lowest member and never reaches 100. The midpoint rule stays strictly between 0 and 100 for any single group. The NIST form never returns exactly 0 or 100 either, because it divides by N + 1.

Interpretation

Read the number as “the share of the group below this value”, not as a mark out of 100.

Percentile rank Plain reading (midpoint rule)
50 About half of the group is below and about half above.
95 About 95 percent of the group is below; about 5 percent is above.
5 About 5 percent of the group is below; about 95 percent is above.

Percentile ranks are not equal-interval: the gap between the 50th and 60th can be a few raw points while the gap between the 90th and 99th can be many. Averaging percentile ranks across groups is therefore misleading, and the raw scores or z-scores are the better inputs for arithmetic. Research uses include funding review, where a priority score is converted to a percentile within a reviewing group (see NIH payline and NIH priority score), and journal rankings (see journal impact factor and quartile rankings). Test scores placed on a common scale use related percentile methods, discussed under test equating and linking.

Assumptions and common mistakes

  • Mixing conventions. A value computed with the strict rule is not comparable to one computed with the midpoint rule; the table above shows differences of up to one point at N = 50 and larger for small N.
  • Using the rank directly. Rank 3 is not the 3rd percentile. Convert with N first.
  • Counting from the wrong end. If rank 1 is the best, the percentile rank is high; reversing the direction turns 95 into 5.
  • Ignoring ties. Tied members should share one percentile rank, so use the count-based formula with E rather than the position-based one.
  • Treating a percentile rank as a percent correct. A percentile rank compares people with each other; it does not say what share of items were answered correctly.
  • Using a tiny group. With N = 5, one step in rank moves the result by 20 points under the strict rule. Report N.

How to report it

State the number, the group, N and the convention. An example sentence for running text:

The participant’s score of 3 corresponded to a percentile rank of 60 within the sample (N = 5), computed with the midpoint rule for ties.

Put the reference group and N next to every percentile rank, and say whether a rank of 1 is the best or the lowest value when reporting from a ranking.

How to calculate it in Excel, R or Python

Each snippet computes the percentile rank of the score 3 in the data 1, 2, 3, 3, 4 with the midpoint rule; the expected answer is 60.

Excel

=(COUNTIF(A2:A6,"<"&3)+0.5*COUNTIF(A2:A6,3))/COUNT(A2:A6)*100

With the data in A2:A6 this returns 60. From a top-down rank in cell B1 and a group size in B2: =(B2-B1+0.5)/B2*100.

R

x <- c(1, 2, 3, 3, 4)
100 * (mean(x < 3) + 0.5 * mean(x == 3))   # 60

Python

from scipy.stats import percentileofscore
percentileofscore([1, 2, 3, 3, 4], 3, kind='mean')   # 60.0

def pr_from_rank(R, N):          # R = 1 is the best, no ties
    return (N - R + 0.5) / N * 100

pr_from_rank(3, 50)              # 95.0

Other kind values return 40.0 ('strict'), 80.0 ('weak') and 70.0 ('rank', the default) for the same input, as in the tie table above.

FAQ

How to calculate percentile from rank?

Convert the rank to a count of values below, then divide by N. For rank R from the top with no ties, the midpoint percentile rank is (N − R + 0.5) / N × 100; rank 3 of 50 gives 95.0.

How to calculate percentile rank?

Use PR = (B + 0.5 × E) / N × 100, where B is the count below the score, E the count equal to it and N the group size. For the scores 1, 2, 3, 3, 4 and the score 3 this is (2 + 1) / 5 × 100 = 60.

Is rank 1 the 100th percentile?

Not under the midpoint rule: with N = 50 it is 99.0. Under the weak rule (values at or below) the top member is 100, and under the strict rule it is 98.

Is a higher rank number a higher percentile?

Only if rank is counted from the bottom. If rank 1 is the best, a larger rank number gives a lower percentile rank.

Sources

Related CASRAI guides: cumulative distribution function and relative frequency and frequency distributions.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about How to Calculate Percentile From Rank (Formulas, Ties, Examples)

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.