Nth Fibonacci Number Calculator
Enter an index n and get F(n) from the recurrence F(n) = F(n-1) + F(n-2), starting at F(0) = 0 and F(1) = 1, as an exact integer up to n = 78.
Fₙ
—
The n-th Fibonacci number
The Fibonacci sequence starts from F(0) = 0, F(1) = 1, and from there F(n) = F(n−1) + F(n−2) for n ≥ 2. Getting just the n-th term, without writing out everything before it, turns out to be a textbook problem in algorithms. There's a closed form, Binet's formula: F(n) = (φⁿ − ψⁿ) / √5, where φ = (1+√5)/2 ≈ 1.6180 and ψ = (1−√5)/2. So F(10) = (φ¹⁰ − ψ¹⁰)/√5 = 55. How do the algorithms compare? Naive recursion is O(2ⁿ), exponential because it keeps redoing the same subproblems. Add memoization to the top-down version and you drop to O(n). The iterative two-variable loop is also O(n), but with O(1) memory. Binet runs in O(1) yet starts drifting due to floating-point error past n > 70. And matrix exponentiation with [[1,1],[1,0]]ⁿ brings it down to O(log n).
Applications
You'll find F(n) in nature, from phyllotaxis to the spirals on sunflowers and pinecones. It shows up in art and architecture too, like Le Corbusier's Modulor, and in market technical analysis, where traders watch Fibonacci retracements at 23.6%, 38.2% and 61.8%. Computer-science courses lean on it as well, using it to teach recursion and dynamic programming.
FAQ
Why doesn't Binet work for very large n? Floating-point math runs out of precision. Somewhere around n > 70 the answer it gives no longer matches the exact integer Fibonacci value.
Which algorithm is fastest in practice? When n is moderate, say up to a few thousand, the iterative O(n) version is the simplest and already plenty fast. Once n gets huge, matrix exponentiation O(log n) pulls ahead.
Does the index start at 0 or 1? These days the standard is F(0) = 0, F(1) = 1. You'll still run into older books that write F(1) = F(2) = 1, which shifts every index by one.
Related Tools
Fibonacci Sequence Generator
Generate the first N terms of the Fibonacci sequence. Shows the sequence, the nth term and the sum of all terms.
Z-Test for a Mean (Known σ)
Computes the z-test for a mean when the population standard deviation is known. It's the simplest case of hypothesis testing about a mean: the statistic measures how many standard errors separate the observed mean from the hypothesized value. When σ is known (or the sample is large), the normal distribution is used instead of the t. The tool returns the z statistic and the two-sided p-value. Enter the sample mean, the hypothesized mean, the population standard deviation and the sample size.
Sharpe Ratio from Series
Computes the Sharpe ratio directly from a series of returns: the mean return minus the risk-free rate, divided by the sample standard deviation. It's the most practical way to get the Sharpe when you have the history at hand, without computing the mean and volatility separately. Remember the result comes in the frequency of the data entered — to annualize monthly returns, multiply by the square root of twelve. Enter the list of returns and the risk-free rate for the same period.
CDB Net Redemption (IOF + Tax)
Calculate how much you get back when redeeming a CDB, after the IOF (redemption under 30 days) and the regressive income tax based on the holding period.
Percent Yield Calculator
Divides the mass actually recovered from a reaction by the theoretical mass predicted by stoichiometry, both in grams, and returns the percent yield.
Particle Reynolds Number
Calculate the particle Reynolds number in settling, Re_p = (ρ_w·v_s·d) ÷ μ, from the fluid density ρ_w (kg/m³), the settling velocity v_s (m/s), the particle diameter d (m) and the dynamic viscosity μ (Pa·s). The particle Reynolds number characterizes the flow regime around a particle settling (or being transported) in a fluid, comparing inertial and viscous forces. Its value sets WHICH settling-velocity formula is valid: for Re_p < ~1, the flow around the particle is LAMINAR and Stokes' Law holds (drag proportional to velocity); for Re_p > ~1000, the flow is TURBULENT and Newton's law holds (drag proportional to velocity squared); in the intermediate range, transition correlations are used (such as Allen's or drag-coefficient expressions vs Re_p). So when computing a settling velocity by Stokes' Law, it is ESSENTIAL to verify afterwards that Re_p < 1 — if not, the Stokes result is wrong and the correct regime's formula must be used. The particle Reynolds number is thus the 'checker' that validates the settling calculation, and it is central in designing settling tanks, classifying particles and hydraulic solids transport. Enter the fluid density, the settling velocity, the particle diameter and the viscosity.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.