Fibonacci Calculator

Calculate key retracement & extension levels with automatic swing detection

Input Parameters

High/Low Anchors
Close Anchors
Minimum reversal size for swing detection. Smaller = more sensitive. Default: 5%.

Fibonacci Analysis

Swing High
–
Swing Low
–
Range
–
Current
–
Trend will be detected automatically when you calculate.

Retracements

0%–
23.6%–
38.2%–
50%–
61.8%–
78.6%–
100%–

Extensions

138.2%–
161.8%–
261.8%–

Price Trend Analysis

Advanced Fibonacci Calculator © 2026 UpFront Trading LLC

Your Choice for Stock Analysis Tools

Fibonacci Calculator: User Guide

How to use UpFront Trading's Fibonacci Calculator to identify swing-based retracement and extension levels, and how to interpret the results.

By John Estrada, MBA Reviewed by Cherane Guy, M.Sc Last updated: October 2026

What This Calculator Does

The Fibonacci Calculator takes a stock symbol and a date range, detects the most recent confirmed swing in the price action, and computes the standard Fibonacci retracement and extension levels from that swing.

A swing is a directional move in price between two turning points — a low to a high (an upswing), or a high to a low (a downswing). Fibonacci levels are drawn by dividing the size of that swing at fixed ratios (23.6%, 38.2%, 50%, 61.8%, and so on). Traders use these levels as potential areas where price may pause, reverse, or continue.

The calculator handles the mechanics — fetching the data, detecting the swing, drawing the levels, and overlaying them on a chart. Your job is to choose a symbol, a date range, and a threshold that matches how you want the swing identified.

How Swing Detection Works

The calculator uses a ZigZag algorithm to find swing points. ZigZag is a standard technique in technical analysis — the same method used by most charting platforms to draw automatic swing lines.

Here's what it does, in plain terms:

  1. It walks through the price bars in the selected range, starting from the oldest.
  2. It tracks the highest high and the lowest low seen so far.
  3. When price reverses by more than the threshold percentage (see below) from the current extreme, it marks that extreme as a confirmed pivot and flips direction.
  4. It continues until the end of the range, producing a list of alternating pivot highs and pivot lows.

From that list, the calculator uses the last two confirmed pivots — call them P1 and P2 — to define the swing you're analyzing. If P2 is a pivot high, the swing is an uptrend (low → high). If P2 is a pivot low, the swing is a downtrend (high → low).

The trend direction is therefore not something you select. It's derived from the pivots the algorithm detects. The results panel displays which trend was detected so you can confirm it matches what you see on the chart.

Why the last two pivots?

Because the most recent completed swing is what traders usually want to measure. Drawing Fibonacci levels from a swing that ended months ago gives levels that are often irrelevant to current price action. Using the last two confirmed pivots keeps the analysis anchored to the current move.

The ZigZag Threshold

The ZigZag Threshold is the minimum reversal size, expressed as a percentage, that the algorithm requires before it will confirm a pivot. It's the most important input on the page — it controls how sensitive the swing detection is.

How to think about it

  • Smaller threshold (e.g., 2–3%): more pivots detected, tighter swings. Useful when you want to see shorter-term structure. Risk: noise can be mistaken for pivots.
  • Larger threshold (e.g., 8–15%): fewer pivots, larger swings. Useful for long-term analysis. Risk: intermediate swings get ignored.
  • Default of 5%: a reasonable starting point for daily data on large-cap US equities. It corresponds roughly to the kind of swing a trader would draw by eye over a 6-to-12-month window.

Choosing a value

There's no universal correct number. The right threshold depends on the symbol and the timeframe. Volatile names (small-caps, biotech, crypto-adjacent equities) warrant a larger threshold; stable large-caps warrant a smaller one. If the calculator returns "No clear swing detected," the threshold is likely too high for the range you selected — lower it or widen the date range.

Reset to default

The "Reset to 5%" link next to the threshold input restores the default value. It does not recalculate automatically — click Calculate when you're ready.

High/Low vs Close Anchors

The ZigZag always uses wicks (highs and lows) to detect pivots — that's how the algorithm works. The anchor toggle then controls which price at each pivot becomes the swing endpoint.

ModeSwing High AnchorSwing Low AnchorWhen to use
High/Low AnchorsThe wick high of the high pivot barThe wick low of the low pivot barClassic Fibonacci — measures the full price extremes, including wicks
Close AnchorsThe closing price of the high pivot barThe closing price of the low pivot barClose-based levels — ignores wick extremes, uses closing prices at the same pivot dates

Both modes use the same pivots — the same dates, the same bars. Only the price used at each pivot changes. That means Close Anchors produces a tighter range than High/Low Anchors, because closes are almost always inside the day's high/low.

High/Low Anchors

Best when you want levels that reflect the full extent of price movement. Most widely used by swing traders and by charting platforms' default Fibonacci tools.

Close Anchors

Best when you consider wicks to be noise — for example, on thinly traded names where a single bad tick can skew the range. Produces tighter, "cleaner" levels.

Neither is correct or incorrect. Choose the one that matches the way you draw Fibonacci levels on your own charts.

Step-by-Step

1

Enter the stock symbol

Type the ticker symbol (e.g., AAPL, MSFT, SPY). The symbol is uppercased automatically. Indices such as ^GSPC are also accepted.

2

Set the date range

Choose a From and To date. The range needs to be wide enough to contain at least one full swing — typically 6 to 12 months for daily data. Narrow ranges may produce "No clear swing detected."

3

Choose your anchor mode

Select High/Low Anchors for classic wick-based levels, or Close Anchors if you prefer close-based levels. See the previous section for details.

4

Adjust the ZigZag threshold if needed

Leave at 5% for a first pass on a large-cap stock. Lower it to detect tighter swings, or raise it to focus on larger structure. Click Reset to 5% to return to the default.

5

Click Calculate Fibonacci Levels

The calculator fetches the data, detects the swing, and displays the levels and chart. Trend direction is determined automatically from the detected swing.

6

Review and iterate

Compare the detected swing to what you see on your own chart. If the levels don't match your read of the structure, adjust the threshold or the date range and recalculate.

Worked Example

To make the math transparent, here's a worked example using round numbers. The same formulas apply to any swing.

Scenario: You run the calculator on a stock and it reports an uptrend (low → high). The ZigZag detected the following anchors:

  • Swing Low: $100.00 (with High/Low anchors)
  • Swing High: $150.00 (with High/Low anchors)

The range is therefore $50.00.

Retracement levels

In an uptrend, retracements are measured down from the high. The formula is: Swing High − Range × Ratio.

LevelRatioCalculationPrice
0%0.000150.00 − 0$150.00
23.6%0.236150.00 − 50 × 0.236$138.20
38.2%0.382150.00 − 50 × 0.382$130.90
50.0%0.500150.00 − 50 × 0.500$125.00
61.8%0.618150.00 − 50 × 0.618$119.10
78.6%0.786150.00 − 50 × 0.786$110.70
100%1.000150.00 − 50$100.00

Extension levels

Extensions project beyond the swing high. The formula is: Swing High + Range × (Ratio − 1).

LevelRatioCalculationPrice
138.2%1.382150.00 + 50 × 0.382$169.10
161.8%1.618150.00 + 50 × 0.618$180.90
261.8%2.618150.00 + 50 × 1.618$230.90

For a downtrend, the formulas flip: retracements are measured up from the low (Low + Range × Ratio), and extensions project below the low (Low − Range × (Ratio − 1)).

Understanding the Results

Summary panel

Shows the detected Swing High, Swing Low, the Range between them, and the latest Close. These are the four numbers every level is derived from.

Trend indicator

Reports whether the detected swing is an uptrend (low → high) or downtrend (high → low), and shows the pivot types that produced it. If no swing is detected, this panel explains why.

Retracement levels

Seven levels between 0% and 100%, measured across the swing. These are potential support (in an uptrend) or resistance (in a downtrend) zones.

Extension levels

Three levels beyond the swing high or low (138.2%, 161.8%, 261.8%). These are potential profit-target zones if price continues past the swing extreme.

Price chart

Overlays the price series with each Fibonacci level drawn as a horizontal dashed line. Visually confirms which levels price has interacted with.

Error banner

If the calculator can't complete the request — bad symbol, invalid date range, insufficient data, no swing detected — a red banner appears at the top of the results panel with the reason.

Why Fibonacci Levels Matter

It's worth being clear about what Fibonacci levels are and what they aren't. They are not a predictive law of markets. What makes them useful is that a large number of market participants watch them. When many traders expect a level to act as support, their collective buying behavior can make it act as support — a self-fulfilling dynamic that has kept these levels relevant for decades.

The ratios, and where they come from

The ratios come from the Fibonacci sequence (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...), in which each number is the sum of the two before it. Dividing successive terms produces a stable set of ratios:

  • 23.6% — derived from 13/55 ≈ 0.236
  • 38.2% — derived from 21/55 ≈ 0.382
  • 61.8% — derived from 34/55 ≈ 0.618, the "golden ratio"
  • 78.6% — the square root of 0.618

The 50% level is not a true Fibonacci ratio. It comes from Dow Theory (the idea that markets often retrace halfway before continuing) and was absorbed into Fibonacci tooling over time. It's included because it's universally watched, not because it's mathematically Fibonacci.

Which levels are watched most

In practice, not all levels carry equal weight:

  • 61.8% is the most closely watched. On a healthy trend, price often retraces to roughly this level before continuing. A break below 61.8% is widely read as a warning that the trend may be failing.
  • 38.2% is the next most important — common on strong trends that barely pull back before resuming.
  • 50% is watched because it's a round number and because of Dow Theory tradition.
  • 23.6% and 78.6% are less commonly traded as standalone levels but useful when they align with other technical features.

The Golden Pocket and OTE

Two related concepts come up frequently among traders who use Fibonacci:

  • Golden Pocket: the zone between the 61.8% and 65% retracement levels. Considered a high-probability reversal zone in a trending market.
  • Optimal Trade Entry (OTE): the zone between the 61.8% and 78.6% retracements, used by some traders as an entry window on pullbacks.

The calculator doesn't draw these zones explicitly, but you can identify them visually on the chart by looking between the 61.8% and 78.6% lines.

Confluence is what matters most

A Fibonacci level in isolation is a weak signal. A Fibonacci level that coincides with something else — a rising 200-day moving average, a prior support/resistance area, a round number, a volume profile node — is a strong one. Professional traders refer to this alignment as confluence, and it's the single biggest factor in whether a Fibonacci level actually holds.

Limitations and Caveats

Being honest about what the tool does not do is more useful than overselling it. Here's what to keep in mind.

  • The last pivot is confirmed, not current. The ZigZag marks a pivot only after price reverses by the threshold amount. If price is still making new highs, the most recent pivot may be older than the actual current extreme. This is standard for any ZigZag-based tool.
  • Threshold choice changes the answer. A 3% threshold and a 10% threshold will detect different pivots and produce different levels. Both can be "correct" depending on what you're analyzing. This is a feature, not a bug, but it means there's no single canonical Fibonacci chart.
  • Close Anchors can occasionally fail. If the close of the high pivot bar is lower than the close of the low pivot bar (rare, but possible on gap-heavy names), the swing is invalid and the calculator will report "No clear swing detected." Switch to High/Low anchors in that case.
  • Daily data only. The calculator uses end-of-day historical data. It does not support intraday intervals. For intraday Fibonacci analysis, you'd need a different tool.
  • Adjusted vs unadjusted prices. Historical data may or may not reflect dividend and split adjustments depending on the data source. This affects long-range swings more than short ones.
  • No confluence detection. The calculator draws Fibonacci levels in isolation. It does not check whether they align with moving averages, prior highs, or other technical features. That analysis is on you.

A note on interpretation

Fibonacci levels are probabilistic zones of interest, not guaranteed turning points. Price can blow straight through any level without pausing, particularly on news-driven moves. Treat the levels as context, not as signals.

FAQ

What is a Fibonacci retracement?

A Fibonacci retracement is a horizontal line drawn at a ratio (23.6%, 38.2%, 50%, 61.8%, 78.6%) of a prior price swing. Traders watch these levels as potential areas where a pullback might stop and the prior trend might resume.

What is a Fibonacci extension?

An extension projects a Fibonacci ratio beyond the end of the prior swing — commonly 138.2%, 161.8%, or 261.8%. Extensions are typically used as profit targets once price has broken past the swing high (in an uptrend) or swing low (in a downtrend).

Which Fibonacci level is most important?

The 61.8% retracement. It's the most closely watched level and often acts as the last line of defense for a trend. The 38.2% and 50% levels are also significant. For extensions, 161.8% is the most commonly targeted.

Why did the calculator say "No clear swing detected"?

This means the ZigZag algorithm didn't find at least two pivots that met the threshold within your date range. Common causes: the threshold is too high, the date range is too narrow, or the symbol had unusually low volatility during the period. Try lowering the threshold or widening the range.

Should I use High/Low anchors or Close anchors?

High/Low is the classic approach and what most charting platforms default to. Use Close anchors if you prefer to ignore wicks — for example, on thinly traded names where wick extremes are unreliable. Both are legitimate; the choice is stylistic.

What ZigZag threshold should I start with?

5% is a reasonable default for daily data on large-cap US equities. Adjust from there based on the volatility of the symbol and the timeframe you care about.

Does the calculator support intraday data?

No. It uses end-of-day historical data only. Intraday Fibonacci analysis requires a different data source and a different tool.

Can I use this for crypto, forex, or futures?

The calculator fetches data from a US equity data provider. It may work for some ETFs and indices, but it's designed for equities. Symbols outside that universe will likely return an error or no data.

JE

John Estrada, MBA

Founder, UpFront Trading · 15 years experience in finance

I am the Founder of UpFront Trading and hold an MBA, bringing a business and analytical perspective to financial markets. My education and hands-on experience developing stock screeners, strategy backtesting tools, and financial calculators provide the foundation for my articles on technical analysis and investment research. Through my writing and tools, I help readers evaluate market trends, test investment ideas, and make more informed financial decisions.

Disclaimer

The Fibonacci Calculator and this guide are provided for educational and informational purposes only. Nothing here constitutes financial, investment, or trading advice. Fibonacci levels are analytical tools, not predictions, and no level is guaranteed to hold. Past price behavior is not indicative of future results.

Always do your own research and consult a qualified financial professional before making investment decisions. UpFront Trading LLC assumes no responsibility for any trading decisions made using this tool or guide.