Tidal height sinusoid model
Sketch the tide between high and low water from three numbers: with high water at 3.2, low water at 0.4 and a 12.42-hour cycle, the level 3.105 hours after high tide is 1.8, the mean. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- High tide
- 3.2
- Low tide
- 0.4
- Period
- 12.42
- Time
- 3.105
- Mean
- 1.8
- Amplitude
- 1.4
- Height
- 1.8
- Angular frequency
- 0.5058925368
Coastal engineering notes, classroom trigonometry labs, and small marine apps often need a first-order water-level estimate from only three published numbers: high tide, low tide, and the tidal period. This tidal height sinusoid model calculator turns those levels into a pure cosine wave whose peak is high water, whose trough is low water, and whose period matches the high-to-high cycle you supply. You pass the elapsed time since a high-tide reference and receive the modelled height plus the derived mean level, amplitude, and angular frequency. Use it when a single harmonic is enough to sketch the envelope of the tide, and pair it with real tide tables when you need multi-constituent accuracy.
Single-harmonic tide model and the cosine convention
A pure sinusoid is the standard introductory model for a semi-diurnal or diurnal tide when you only know the vertical range and the period. The height at elapsed time t after a high-water reference is then mean plus amplitude times the cosine of two-pi times t over the period. Cosine is chosen deliberately: at t equals zero the cosine is one, so the model returns high water without an extra phase term.
At half a period the cosine is negative one and the height is low water. At a quarter period the height sits on the mean, which is useful for mid-tide sketches and for checking that your units of time match the period. Semi-diurnal ports often use a period near twelve point four two hours; diurnal ports use roughly twice that.
The calculator does not invent a period for you—you supply the cycle length that matches the station or problem statement.
Where a simple tide curve helps
Trigonometry courses use a tidal height model so students connect amplitude, period, and phase to a physical story instead of abstract A-sin-omega-t drills alone. Coastal field notebooks need a quick envelope of high and low water between survey stations when a full harmonic reconstruction is overkill. Small charting widgets and marina dashboards can preview a simplified curve from published range and period before users load authoritative predictions.
Exam generators need a deterministic oracle that rejects non-positive periods and inverted high/low pairs so auto-graders never mark a physically impossible setup as correct.
What you can do with it
Classroom cosine-tide labs
Give students high water, low water, and period; have them predict height at chosen times and verify against the deterministic model.
Field notebook envelopes
Sketch a single-harmonic water-level curve between survey windows using only published range and cycle length.
Exam and LMS auto-grading
Mark tidal sinusoid problems with a fixed oracle that rejects non-positive period and high below low without network tide tables.
FAQ
How do I estimate tide height between high and low water?
Take the mean of high and low water, add half the range times the cosine of 2π × time ÷ period. With high water 3.2 and low water 0.4, the mean is 1.8 and the swing either side is 1.4.
What time should I enter in the tide model?
Enter the time elapsed since a high-water reference, in the same unit as the period. At time 0 the model gives high water, at half a period it gives low water, and at a quarter period it sits on the mean.
Which tidal period should I use?
Use the high-to-high cycle of your station or problem. Ports with two tides a day often run near 12.42 hours, and ports with one tide a day roughly twice that. The period must be greater than zero.
Is a sinusoidal tide model accurate enough for navigation?
No. A single cosine wave is a first estimate for lessons, notes and quick sketches. Real tides mix several components, so check official tide tables before any decision that depends on the actual water depth.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/trig/model-tide-sinusoid \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"high_tide":3.2,"low_tide":0.4,"period":12.42,"time":3.105}'const res = await fetch("https://api.kit.forhosting.com/trig/model-tide-sinusoid", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"high_tide": 3.2,
"low_tide": 0.4,
"period": 12.42,
"time": 3.105
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/trig/model-tide-sinusoid",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"high_tide": 3.2,
"low_tide": 0.4,
"period": 12.42,
"time": 3.105
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/trig/model-tide-sinusoid", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"high_tide":3.2,"low_tide":0.4,"period":12.42,"time":3.105}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"high_tide":3.2,"low_tide":0.4,"period":12.42,"time":3.105}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/trig/model-tide-sinusoid", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"high_tide": 3.2,
"low_tide": 0.4,
"period": 12.42,
"time": 3.105
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "trig.model_tide_sinusoid",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The implementation is deterministic parse-tier logic—no forecasts, no network tide APIs, no random phase—so homework checks, notebook cells, and prepaid API jobs always agree on the same floating-point answer.
Single-harmonic tide model and the cosine convention
Define mean water level as the average of high_tide and low_tide, and amplitude as half the range between them. Because amplitude is non-negative only when high_tide is at least low_tide, the endpoint rejects inverted levels instead of silently swapping them, which keeps labels honest in graded work and in APIs that log the raw request next to the answer.
Input contract, response fields, and validation errors
Period must be strictly greater than zero so that angular frequency two-pi over period is defined. Example: high three point two, low zero point four, period twelve point four two, time three point one zero five yields a mid-falling height near the mean because that time is about one quarter of the period. POST four finite numbers: high_tide and low_tide in any consistent length unit (metres, feet, or chart datum units), period as a positive duration in the same time unit you will use for time, and time as elapsed time since the high-tide reference in that same unit. Numeric strings that parse as finite IEEE numbers are accepted; empty strings, non-numeric text, infinity, and NaN fail with invalid_input naming the field. If high_tide is strictly less than low_tide the request fails with a clear message rather than producing a negative amplitude that would flip the high and low labels. On success the body echoes the four inputs, reports mean and amplitude, returns height at the requested time, includes angular_frequency as two-pi divided by period, and restates the closed-form formula string for display beside the number. Failed validation is not billed; successful pure-parse calls use the published $0.002 base price with no model tokens.
Where a tidal height sinusoid API earns its keep
Because the work is pure arithmetic on four numbers, latency stays low on the edge and cost stays at $0.002 per successful item. When you need residual-constituent accuracy, M2 and S2 decomposition, or official national predictions, step up to specialised tide software; keep this endpoint for transparent single-harmonic height at a specified time.
Technical questions
How is tidal height computed from high tide, low tide, and period?
mean = (high_tide + low_tide) / 2, amplitude = (high_tide − low_tide) / 2, and height = mean + amplitude · cos(2π · time / period). Time is measured from a high-tide reference so t = 0 returns high water.
What units should I use?
Any consistent length unit for high_tide, low_tide, and height, and the same time unit for period and time (hours are common). The calculator does not convert units.
Why must period be positive?
Angular frequency is 2π / period. Zero or negative period makes the cosine argument undefined or reverses the intended high-to-low cycle, so the API returns invalid_input.
What if high_tide is less than low_tide?
The request fails with invalid_input. Amplitude must be non-negative so the labels high and low stay meaningful; swap the values or correct the source data.
What does the tidal height sinusoid model cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.