ForHosting KIT · Finance & money

Fibonacci retracement calculator

For a swing from 0 to 100, the 61.8% retracement sits at 38.2 on a pullback and at 61.8 on a bounce. You get all five levels, 23.6% to 78.6%, for both directions at once. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
High
100
Low
0
You get
Range
100
Uptrend 23 6
76.4
Uptrend 38 2
61.8
Uptrend 50
50

Fibonacci retracement levels are the five prices most charting desks draw after a swing high and a swing low: 23.6 percent, 38.2 percent, 50 percent, 61.8 percent, and 78.6 percent of the measured move. The arithmetic is closed form: range equals high minus low, then each ratio multiplies that range.

How Fibonacci retracement prices are computed from a swing

A Fibonacci retracement is not a forecast and it is not the nth term of the Fibonacci sequence. It is a set of horizontal prices placed between a completed swing high and a completed swing low, using the ratios that desks have used for decades: 23.6 percent, 38.2 percent, 50 percent, 61.8 percent, and 78.6 percent. Given high H and low L with H strictly greater than L, the range is H minus L.

In an uptrend the market has already rallied from L to H and is now pulling back; each retracement price is H minus the ratio times the range, so 23.6 percent sits just under the high and 78.6 percent sits just above the low. In a downtrend the market has already fallen from H to L and is now bouncing; each retracement price is L plus the ratio times the range, so 23.6 percent sits just above the low and 78.6 percent sits just under the high.

Zero percent and one hundred percent are the high and the low themselves; they are echoed as high, low, and range rather than duplicated as extra levels.

Where a Fibonacci retracement calculator earns its keep

Discretionary traders and desk assistants use a Fibonacci retracement calculator so the 38.2 percent and 61.8 percent prices of a named swing are a contract, not a pixel pick on a scaling chart. Education sites and interview drills need a deterministic oracle that rejects a high that is not greater than the low instead of drawing a reversed ladder that a student might treat as a valid setup. Failed validation does not consume balance.

Keep high strictly above low, treat 50 percent as the conventional midpoint rather than a Fibonacci claim, pin the rounded level prices in tests, and you get reproducible retracement prices for homework, overlays, and edge workers without standing up a charting library of your own.

Mark pullbacks on a completed swing

After a rally from a swing low to a swing high, read the uptrend 38.2, 50, and 61.8 percent prices and place rest or alert levels without picking pixels on a chart.

Bounce levels after a decline

After a drop from a swing high to a swing low, read the downtrend column so 23.6 and 38.2 percent bounce prices are the same numbers a bot and a worksheet both use.

How are Fibonacci retracement levels calculated from a high and a low?

Range is high minus low. Uptrend prices are high minus each ratio times the range. Downtrend prices are low plus each ratio times the range. The five ratios are 0.236, 0.382, 0.5, 0.618, and 0.786.

What happens if the high is not greater than the low?

Equal prices and reversed pairs are rejected so a ladder is never drawn the wrong way.

Does the calculator return uptrend and downtrend prices?

Yes. One call returns both: pullbacks measured down from the high and bounces measured up from the low. Pick the column that matches the direction of the prior swing.

Why is 50 percent included if it is not a Fibonacci ratio?

Charting desks draw the halfway mark with the Fibonacci set.

How do I use the levels after a rally or a drop?

After a rally from a swing low to a swing high, read the uptrend prices, such as 38.2%, 50% and 61.8%, to place resting orders or alerts. After a drop, read the downtrend column for the bounce levels.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/fin/fibonacci-retracement

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/fin/fibonacci-retracement \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"high":100,"low":0}'
{
  "high": 100,
  "low": 0
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "fin.fibonacci_retracement",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This calculator takes those two prices, fails with invalid_input when the high is not strictly greater than the low, and returns each level twice — once as an uptrend pullback measured down from the high, and once as a downtrend bounce measured up from the low.

How Fibonacci retracement prices are computed from a swing

This endpoint returns both tables from the same two inputs, because a calculator that only measures down from the high silently lies on a decline.

Input contract, response shape, and error behaviour

If high is not strictly greater than low — equal prices, a reversed pair, or a high that somehow is not greater — the task fails with a message that high must be greater than low, and that failure is not billed. There is no trend enum: the response always includes the uptrend set and the downtrend set so a client that already knows the direction of the prior swing can pick the matching columns. Prices are rounded to ten decimal places so goldens compare byte for byte across runtimes. Example: high one hundred and low zero yields an uptrend 23.6 percent at 76.4, 38.2 percent at 61.8, 50 percent at 50, 61.8 percent at 38.2, and 78.6 percent at 21.4, with the downtrend column the complement measured up from zero. POST a JSON body with two required finite numbers: high, the swing peak of the measured move, and low, the swing trough. Aliases swing_high and high_price map to high; aliases swing_low and low_price map to low. Each field may arrive as a JSON number or as a numeric string. Missing fields, empty strings, and non-finite values fail with invalid_input naming the field. On success the body echoes high, low, and range, then the five uptrend prices as uptrend_23_6, uptrend_38_2, uptrend_50, uptrend_61_8, and uptrend_78_6, the five downtrend prices with the same suffixes, a levels array of records each carrying percent, ratio, uptrend_price, and downtrend_price, and a formula string restating the two identities. Pair the numbers with your own charting code if you need lines on a candle series; this endpoint does not fetch OHLC, detect swings, or project Fibonacci extensions beyond the measured move.

Where a Fibonacci retracement calculator earns its keep

Alert bots and notebooks post high and low after a swing is confirmed, then pin uptrend_61_8 or downtrend_38_2 in tests so a later refactor of the ratio table cannot silently move a rest level.

Tutorials, drills, and CI fixtures

Grade Fibonacci retracement items and lock goldens with an oracle that rejects a reversed high/low pair instead of inventing a ladder.

What does the Fibonacci retracement calculator cost?

The browser tool is free. API requests use prepaid balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →