ForHosting KIT · Math

Boat and stream speed calculator free online

A boat doing 10 in still water against a current of 2 moves upstream at 8 and downstream at 12. Work the classic boat-and-stream problem either way: from boat and current speeds, or back from the upstream and downstream speeds. 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
Calculation mode
From boat and stream speeds
Boat speed in still water
10
Stream speed
2
You get
Upstream speed
8
Downstream speed
12

Converts between still-water boat speed, stream speed, and upstream/downstream speeds. Free, deterministic, and private in your browser. No account required.

How boat and stream speeds relate

In classical quantitative problems a boat moves through still water at speed b while a current flows at speed s. When the boat heads upstream against the current the effective speed is b minus s; when it heads downstream the speeds add so the effective speed is b plus s. The inverse problem starts from measured upstream and downstream speeds u and d and recovers boat speed as their average and stream speed as half their difference.

Every input must be a finite number; boat must be strictly positive, stream non-negative, and for the forward mode boat must exceed stream so upstream stays positive. In inverse mode both upstream and downstream must be positive and downstream must exceed upstream. Nothing is inferred statistically; the algebra is exact given the stated assumptions about constant speeds.

Edge cases, teaching use, and limits

Requires boat faster than stream so upstream remains positive in the forward direction. Zero stream is allowed and simply makes upstream equal downstream equal boat. Negative speeds are rejected because they do not model the classical still-water plus current framing.

Equal upstream and downstream would force a zero stream but inverse mode still demands downstream strictly greater than upstream to keep the contract simple and the goldens unambiguous. Teachers can walk students from still-water ten with current two to upstream eight and downstream twelve, then invert the pair to recover the originals. Automation scripts call the same pure function without installing a spreadsheet or computer algebra system.

Results are stable across browser and edge because rounding is documented and shared. Author samurai maintains the workshop copy; integration and production deployment remain house responsibilities after green verification.

Homework and exams

Check classic boat-and-stream quantitative problems with stable, reproducible answers.

Automation

Call the same pure function from scripts without installing a spreadsheet or CAS.

Is this free?

Yes. Tier A runs entirely in your browser without an account.

How do I find the boat's speed in still water from its upstream and downstream speeds?

Take their average. With an upstream speed of 8 and a downstream speed of 12, the boat does 10 in still water, and the current is half the difference between the two, which is 2.

Why must the boat be faster than the current?

Because going upstream the current is subtracted from the boat's speed. If the current were as fast or faster, the upstream speed would be zero or negative and the boat would never make headway, which the classic problem does not allow.

Can the current be zero?

Yes. With no current, the upstream speed, the downstream speed and the boat's speed in still water are all the same number, and the calculator returns them that way.

Why must the downstream speed be greater than the upstream speed?

The current helps the boat downstream and slows it upstream, so downstream is always the faster of the two. When working backwards, equal speeds would only mean no current, which you can enter directly instead.

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/math/boat-stream

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/math/boat-stream \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mode":"from_boat_stream","boat":1}'
{
  "mode": "from_boat_stream",
  "boat": 1
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.boat_stream",
  "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.

How boat and stream speeds relate

The pure function solve accepts either mode and returns a single payload with boat, stream, upstream, and downstream so clients never guess which fields are present. Wrong types, missing fields, and out-of-range combinations become clear invalid_input errors instead of silent NaN results. The same pure arithmetic runs offline in the browser under the parse engine and on the API path without network calls for the calculation itself.

Inputs, outputs, and stable contracts

Required fields depend on mode. Presentation layers may coerce numeric strings from a form before calling solve, but the core never converts garbage into NaN silently. Empty objects, contradictory ranges, and non-finite values are rejected early. Client.impl equals the type so the published module name matches the landing asset path. Authoring stays free of a stamped id; the compiler assigns identifiers when the house integrates the capacity into the contiguous catalog. In from_boat_stream you supply boat and stream; in from_up_down you supply upstream and downstream. Optional mode defaults to from_boat_stream when omitted. The success payload always echoes mode and the four speed fields so UI metrics bind without guessing names. Extremely large intermediate values that overflow IEEE-754 become explicit errors rather than null fields.

Edge cases, teaching use, and limits

When inputs are invalid you receive invalid_input with a clear English message suitable for both humans and tests.

Teaching demos

Show worked examples with golden fixtures that match the free widget and the API.

Does it call the network?

No. The parse engine keeps everything on-device.

What if my input is invalid?

You receive invalid_input with a clear English message.

Are results stable?

Yes. Deterministic math and golden examples freeze the contract.

Who authors this capacity?

samurai on the ForHosting KIT workshop.

Read the full KIT documentation →