Statistical functions

F.DIST

Close: 197 of 375 recorded answers differ in the last bits, worst 8 ULP

Everything else matches (369 in the answer bank and 6 workbook cells). Last-bit means a finite number within 16 ULP of Excel's. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicF.DIST
BulgarianF.DIST
CzechF.DIST
DanishF.FORDELING
GermanF.DIST
GreekF.DIST
English (Australia)F.DIST
English (United Kingdom)F.DIST
English (United States)F.DIST
SpanishDISTR.F.N
EstonianF.DIST
FinnishF.JAKAUMA
FrenchLOI.F.N
HebrewF.DIST
CroatianF.DIST
HungarianF.DIST
IndonesianF.DIST
ItalianF.DIST
JapaneseF.DIST
KoreanF.DIST
LithuanianF.DIST
LatvianF.DIST
NorwegianF.DIST
DutchF.VERD
PolishROZKŁ.F
Portuguese (Brazil)F.DIST
Portuguese (Portugal)DIST.F
RomanianF.DIST
RussianF.РАСП
SlovakF.DIST
SlovenianF.DIST
Serbian (Latin)F.DIST
SwedishF.FÖRD
ThaiF.DIST
TurkishF.DAĞ
UkrainianF.DIST
VietnameseF.DIST
Chinese (Simplified)F.DIST
Chinese (Hong Kong)F.DIST
Chinese (Traditional)F.DIST

Names from Microsoft's support site.

What it does

F.DIST(x, deg_freedom1, deg_freedom2, cumulative)

F.DIST(x, deg_freedom1, deg_freedom2, cumulative) returns an F-distribution left CDF (TRUE) or density (FALSE). The first degree count belongs to the numerator and the second to the denominator.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=F.DIST(3,2,2,TRUE) is about 0.75. With both degree counts two, the mathematical left CDF is x/(1+x) and the right tail is 1/(1+x). =F.DIST(3,2,2,FALSE) is about 0.0625, the density rather than a tail.

Quirks

Degree counts are truncated. Microsoft documents #VALUE! for nonnumeric arguments and #NUM! for negative x or degree counts below one. The current shared helper also rejects a nonfinite x and a truncated degree count above 10^10; that code cap is separate from the opened page’s lower-bound wording.

The left CDF rises from zero and the right tail falls from one. The density option in F.DIST is a third quantity, rather than either of those probabilities. At x=0 the current density gives #NUM! for numerator degree one, one for degree two and zero for higher degrees. Those density cases do not change the endpoint probabilities.

The current beta transformation forms the product of x and numerator degrees directly. Extreme products or beta/gamma approximations need their own numerical error and publication checks; a finite mathematical probability alone does not ensure this candidate evaluates it successfully.

How to implement

For the current cumulative route, use ordinary binary64 stores D:

  1. Validate finite nonnegative x and the truncated positive degree counts d1 and d2.
  2. Calculate num=D(d1*x) and den=D(num+d2).
  3. Independently store z=D(num/den) and w=D(d2/den). Return the first result of bratio(d1/2,d2/2,z,w). Both beta arguments are supplied; w is not computed by subtracting z from one.
  4. Apply worksheet number publication. The upper-tail function swaps the shapes and uses the complementary argument as its leading input.

For d1=d2=2 and x=3, num is six and den eight. Both beta shapes are one, so the uniform beta CDF gives z=6/8=0.75.

For the density at positive x, with a=d1/2,b=d2/2, the mathematical expression is (d1/d2)^a*x^(a-1)/(B(a,b)*(1+d1*x/d2)^(a+b)). The current code uses runtime powers and gamma products for that normalization, plus explicit x=0 cases. At d1=d2=2 the expression reduces to 1/(1+x)^2; x=3 gives density 0.0625, distinct from the right-tail probability 0.25.

A log-density or scaled-ratio implementation can improve numerical range, but changes this candidate’s stores and leaves. The paired beta wrapper does not solve every inner approximation; the problem report retains distribution mismatches.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

F.DIST · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
30 f_dist "F.DIST" (4, 4) [V "x", V "deg_freedom1", V "deg_freedom2", V "cumulative"] |s, a, sv| {
    let [x, d1, d2] = nums::<3>(s, a)?;
    out(s, cft::f_dist_kernel(x, d1, d2, flag(s, a, 3)?))
}
f_pdf_kernel · 21 lines · calc-func/src/ported/chi_f_t_family.rs on GitHub
pub fn f_pdf_kernel(x: f64, deg1: f64, deg2: f64) -> Result<f64, WorksheetErrorCode> {
    let x = validate_nonnegative_x(x)?;
    let d1 = truncate_positive_integer(deg1)?;
    let d2 = truncate_positive_integer(deg2)?;
    if x == 0.0 {
        return if d1 < 2.0 {
            // Density diverges to +inf; Excel returns #NUM!
            Err(WorksheetErrorCode::Num)
        } else if d1 == 2.0 {
            Ok(1.0)
        } else {
            Ok(0.0)
        };
    }
    let half_d1 = d1 / 2.0;
    let half_d2 = d2 / 2.0;
    let num = crt_pow(d1 / d2, half_d1) * crt_pow(x, half_d1 - 1.0);
    let den = gamma(half_d1) * gamma(half_d2) / gamma(half_d1 + half_d2)
        * crt_pow(1.0 + d1 * x / d2, (d1 + d2) / 2.0);
    Ok(num / den)
}
f_dist_kernel · 19 lines · calc-func/src/ported/chi_f_t_family.rs on GitHub
pub fn f_dist_kernel(
    x: f64,
    deg1: f64,
    deg2: f64,
    cumulative: bool,
) -> Result<f64, WorksheetErrorCode> {
    let x = validate_nonnegative_x(x)?;
    let d1 = truncate_positive_integer(deg1)?;
    let d2 = truncate_positive_integer(deg2)?;
    if cumulative {
        // W109: Excel's beta wrappers pass the ACCURATE complement pair, not
        // 1-z (identified stagings; b22 check).
        let num = d1 * x;
        let den = num + d2;
        Ok(bratio(d1 / 2.0, d2 / 2.0, num / den, d2 / den).0)
    } else {
        f_pdf_kernel(x, d1, d2)
    }
}

Kernels shared with other functions

Argument and result plumbing

  • flag catalogue/kit
  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
20228Windows, 64-bit, CPU not recorded369

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 20228

Windows, 64-bit, CPU not recorded

369 captured inputs are indexed for this environment. Capture dates: 2026-08-09 to 2026-08-09. This is a reading count, not a comparison with another build.

Alternatives

F.INV maps a left probability to a value. F.DIST.RT computes the upper tail directly, and F.TEST starts with two samples.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents