Statistical functions

F.INV

Close: 1 of 5 recorded answers differ in the last bits, worst 1 ULP

Everything else matches (5 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.INV
BulgarianF.INV
CzechF.INV
DanishF.INV
GermanF.INV
GreekF.INV
English (Australia)F.INV
English (United Kingdom)F.INV
English (United States)F.INV
SpanishINV.F
EstonianF.INV
FinnishF.KÄÄNT
FrenchINVERSE.LOI.F.N
HebrewF.INV
CroatianF.INV
HungarianF.INVERZ
IndonesianF.INV
ItalianF.INV
JapaneseF.INV
KoreanF.INV
LithuanianF.INV
LatvianF.INV
NorwegianF.INV
DutchF.INV
PolishROZKŁ.F.ODWR
Portuguese (Brazil)F.INV
Portuguese (Portugal)INV.F
RomanianF.INV
RussianF.ОБР
SlovakF.INV
SlovenianF.INV
Serbian (Latin)F.INV
SwedishF.INV
ThaiF.INV
TurkishF.TERS
UkrainianF.INV
VietnameseF.INV
Chinese (Simplified)F.INV
Chinese (Hong Kong)F.INV
Chinese (Traditional)F.INV

Names from Microsoft's support site.

What it does

F.INV(probability, deg_freedom1, deg_freedom2)

F.INV(probability, deg_freedom1, deg_freedom2) finds an F-distribution value from a left cumulative probability. 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.INV(0.75,2,2) is about 3. With both degree counts two, the mathematical left CDF is x/(1+x) and the right tail is 1/(1+x).

Quirks

Degree counts are truncated. Nonnumeric arguments give #VALUE!; invalid counts or probabilities give #NUM!. The current shared inverse admits each truncated degree from one through 10^10 and requires an open probability interval 0<p<1.

The opened Microsoft F.INV page states the positive degree-count requirement without this shared helper’s upper cap. Keep the documentation and the current code’s boundary tests distinct: a source guard alone is not an additional Excel measurement.

A left-CDF probability and a right-tail probability select different quantiles. Subtracting an extremely small right-tail probability from one can round to one and lose the target entirely.

How to implement

The current left-tail candidate searches its paired beta forward surface. Let D mean ordinary binary64 storage and I_z(a,b) the regularized lower beta ratio.

  1. Truncate and validate numerator degrees d1 and denominator degrees d2; require 0<p<1.
  2. At each nonnegative trial x, form num=D(d1*x) and den=D(num+d2). Compute z=D(num/den) and w=D(d2/den) separately, then evaluate bratio(d1/2,d2/2,z,w).first. Supplying both independently rounded beta arguments preserves more tail information than setting w to 1-z.
  3. Start with lo=0,hi=1; double hi until the forward value reaches p, with at most 200 expansion checks.
  4. Bisect the nonnegative binary64 encodings as in the shared inverse search, using this increasing CDF and target p. Return the upper endpoint when its encoding is adjacent to the lower one.

For d1=d2=2 the mathematical CDF is x/(1+x). At p=0.75, solving x/(1+x)=0.75 yields three.

The beta routine, its complement pair and the adjacent-value return are separate numerical stages. A beta-quantile transform x=d2*z/(d1*(1-z)) is another mathematical route with different stores. The source’s problem report retains unresolved distribution mismatches; neither route identifies every Excel approximation or certifies the full function.

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.INV · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
33 f_inv "F.INV" (3, 3) [V "probability", V "deg_freedom1", V "deg_freedom2"] |s, a, sv| {
    let [p, d1, d2] = nums::<3>(s, a)?;
    out(s, cft::f_inv_kernel(p, d1, d2))
}
f_inv_kernel · 12 lines · calc-func/src/ported/chi_f_t_family.rs on GitHub
pub fn f_inv_kernel(probability: f64, deg1: f64, deg2: f64) -> Result<f64, WorksheetErrorCode> {
    let p = validate_probability_open_unit(probability)?;
    let d1 = truncate_positive_integer(deg1)?;
    let d2 = truncate_positive_integer(deg2)?;
    let fwd = move |x: f64| {
        let num = d1 * x;
        let den = num + d2;
        bratio(d1 / 2.0, d2 / 2.0, num / den, d2 / den).0
    };
    let hi = search_upper_bound(p, 1.0, fwd);
    Ok(bisect_inverse(p, 0.0, hi, fwd))
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

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

Version differences

No same-input comparison between named Excel builds is recorded for this function here. The documented behaviour below is not a measurement of every Excel release.

Alternatives

F.DIST supplies the forward left CDF. F.INV.RT takes an upper-tail probability; F.TEST computes a sample test probability.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents