Method
Name the convention.
Show the arithmetic.
Quantilenote calculates exactly one unweighted Type 7 sample quantile at your chosen percentile. A sample percentile has multiple possible conventions; this tool makes its chosen rule visible.
Accepted sample and percentile
Enter one signed plain decimal sample value per row. From1 to 5000 observations and at most 250000 UTF-16 code units are accepted. Each value has up to twelve fractional digits and absolute magnitude no greater than 1000000000000. Outer ASCII spaces and tabs are ignored, while duplicates remain separate observations.
There is no header, comma separator, exponent, leading plus, unit, percent symbol, missing-value token or automatic omission. Use0.5 rather than.5. Sample negative zero normalizes to zero. LF and CRLF line endings are accepted. Empty rows caused solely by final line terminators are removed; interior blank rows and spaces/tabs-only rows reject, even at the end. Lone CR, BOM and Unicode whitespace substitutions are outside the grammar. Browser textareas can normalize pasted line endings before the script receives them.
The percentile field accepts at most 64 characters. The single percentile runs from 0 through 100, with up to six fractional digits. Enter 75 or75.5, rather than 75%, and use no signs or exponent. Outer ASCII spaces and tabs are allowed. Every input must validate before success; an invalid row does not produce a partial sample or silent removal.
The exact Type 7 rule
Sort the n accepted values ascending, retaining duplicates. Let p be the entered percentile divided by100 exactly. The zero-based fractional rank is h=(n-1)p. Its floor j identifies the lower sorted index, and g=h-j is the upper interpolation weight.
If n=1, return the sole value. At p=1, return the maximum. Otherwise compute Q=(1-g)x[j]+g x[j+1], equivalently x[j]+g(x[j+1]-x[j]). The display reports h as both decimal and fraction, the one-based order positions j+1 and j+2, their values and g. Zero-based rank and one-based visible positions deliberately use different labels.
At an exact interior knot, g=0 and the lower bracket value is returned; the next bracket can still be shown with zero contribution. At percentile 0 the answer is the minimum. At percentile 100 the two displayed bracket positions coincide at the maximum, with zero upper weight. A singleton also shows its only position twice and has rank/weight zero.
Probability-knot interpretation
For a sample with at least two observations, sorted position k+1 sits at probability knot k/(n-1), for k from 0 through n-1. Type 7 linearly interpolates those knots. This is the context described by the official R stats Sample Quantiles documentation.
That reference documents multiple sample-quantile definitions. This tool implements the stated Type 7 mathematics with exact rational arithmetic; it does not claim all quantile definitions, R input parsing, software display formatting or floating-point tolerance behaviour will match.
Exact output can be longer than input
Sample decimals use scaled BigInt integers with 12 fractional places; the percentile uses six places before division by100. Rank comparisons and interpolation are exact rational operations. The reduced fraction and complete terminating decimal are both shown, without using binary floating-point rank comparisons.
The result may have up to 20 fractional places under these input bounds. For sample 0 and 0.000000000001 at percentile 0.000001, the result is0.00000000000000000001, exactly1/100000000000000000000. Input precision limits are not output rounding rules.
Duplicates and interpretation
Repeated values remain separate observations. A result can coincide with a value repeated many times or lie between observations. With0,0,100, the50th percentile is0, yet no observation is strictly below0. Do not interpret the entered percentage as a guaranteed strict-below count for a small sample.
This is an unweighted calculation on the entered sample. It does not estimate a population distribution, infer missing observations, provide a confidence interval, draw a histogram or support financial/medical decisions. Different units must not be mixed; the tool performs no unit conversion.
Current-result notes and bounds
Calculate percentile uses the complete validated sample. Editing either input immediately hides old results, disables exports and clears previous copy fallback text. Reset example restores10,20,40,100 at 75. No chart, extra percentile sweep or alternate-algorithm selector is included.
Text/JSON notes include all values in their entered order as normalized exact decimals, a sorted copy retaining duplicates, the chosen percentile and assumptions. Clipboard access is attempted only after Copy complete notes; a local fallback is available if it fails. A late clipboard response cannot relabel an edited or reset result as current. Downloads use local object URLs rather than a remote service.
Read the worked examples or return to Quantilenote.