Clock angle calculator
At 3:30 the hands of a clock are 75 degrees apart, not 90, because the hour hand keeps creeping toward four. Enter an hour and a minute to get that smaller angle and where each hand points. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Hour
- 3
- Minute
- 30
- Hour hand deg
- 105
- Minute hand deg
- 180
- Angle deg
- 75
The clock angle calculator answers a classic puzzle with exact arithmetic: given an hour and a minute on a twelve-hour analog dial, what is the smaller angle between the two hands? It accounts for the fact that the hour hand keeps moving as the minutes pass, so at 3:30 the answer is 75 degrees, not 90. You send two numbers and get back the position of each hand and the angle between them, deterministic and identical every time.
Why the naive answer is wrong
Ask someone the angle between the hands at 3:30 and many will say 90 degrees: the minute hand points at six, the hour hand at three, a quarter of the dial. But the hour hand does not sit still waiting for the next hour — by half past three it has already drifted halfway toward four. Each hand therefore occupies a precise position: the minute hand moves six degrees per minute, while the hour hand moves thirty degrees per hour plus half a degree per minute.
At 3:30 the hour hand is at 105 degrees from twelve, the minute hand at 180, and the real separation is 75 degrees. This clock angle calculator applies exactly that model, so the result is the true geometric answer rather than the common approximation. The same reasoning explains every well-known case: at 6:00 the hands are opposite at 180 degrees, at 12:00 they overlap at 0, and at 9:15 the hour hand has crept a quarter of the way toward ten, giving 172.5 degrees instead of 180.
How the angle is computed
The solver converts each input to a position measured in degrees clockwise from twelve. The minute hand position is simply six times the minute value, covering the full 360 degrees over sixty minutes. The hour hand position is thirty times the hour — reduced modulo twelve so 12 behaves as 0 — plus half a degree per minute, because it completes a full turn in twelve hours.
The absolute difference between those two positions gives the arc swept from one hand to the other in one direction; taking the minimum of that arc and its complement to 360 yields the smaller angle, which is always between 0 and 180 degrees inclusive.
Where it fits in practice
Interview-prep platforms use it to grade candidate answers to the classic clock puzzle automatically: submit a time, compare the candidate's formula against the exact value. Educational sites and worksheets generate questions and answer keys in bulk, with the per-hand positions included so a diagram can be drawn next to each exercise. Puzzle and game backends validate user submissions server-side without re-implementing the formula in every client.
What you can do with it
Grade an interview puzzle automatically
Compare a candidate's formula for the clock-angle problem against the exact value for any hour and minute, server-side.
Generate worksheets with answer keys
Produce clock-reading exercises in bulk, with the position of each hand included so diagrams and answers stay consistent.
Validate game or quiz submissions
Check a player's answer about the angle between clock hands without shipping the solution logic to the client.
FAQ
Which angle does it return?
Always the smaller angle between the two hands, between 0 and 180 degrees inclusive. The reflex angle is never returned.
What input ranges are accepted?
Hour from 1 to 12 on a twelve-hour dial, minute from 0 to 59.
Does the hour hand move with the minutes?
Yes. The hour hand advances half a degree per minute, so at 3:30 the angle is 75 degrees, not 90.
Is the result deterministic?
Completely. There is no network, clock or randomness involved; the same input always returns byte-identical output.
Can I pass 24-hour times?
Pass the hour reduced to the 12-hour dial: 15:20 should be sent as hour 3, minute 20. Hour values above 12 are rejected.
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/math/clock-angle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"hour":3,"minute":30}'const res = await fetch("https://api.kit.forhosting.com/math/clock-angle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"hour": 3,
"minute": 30
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/clock-angle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"hour": 3,
"minute": 30
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/clock-angle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"hour":3,"minute":30}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"hour":3,"minute":30}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/clock-angle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"hour": 3,
"minute": 30
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.clock_angle",
"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 same code runs free in your browser and as a paid API endpoint, so the result you test is the result you ship.
How the angle is computed
Input validation is strict: the hour must lie between 1 and 12 on a twelve-hour dial, and the minute between 0 and 59, and anything outside those ranges is rejected with a clear invalid_input error before any arithmetic happens. Results are rounded to twelve decimal places so the JSON output is byte-stable across machines and languages.
Where it fits in practice
The endpoint is small, fast and completely deterministic, which makes it easy to embed anywhere. Each call costs $0.002, with no per-unit surcharge: the input is two numbers and the output is a small object, so the cost of a batch of a thousand checks stays at a few dollars' fraction of a cent.
Technical questions
What does it cost?
$0.002 per request. It is also free to run in your browser on this page.