Circle calculator
Give one measure of a circle and get all four: a radius of 1 returns a diameter of 2, a circumference of 6.283185 and an area of 3.141593. Handy for drawings, pipes and homework. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Radius
- 1
- Diameter
- 2
- Circumference
- 6.283185
- Area
- 3.141593
- Pi (π)
- 3.1415926536
Takes exactly one of radius, diameter, circumference or area for a circle, recovers the radius from it, and returns all four measures together with the pi constant used and which field you supplied.
Solving from any single measure
You supply exactly one of radius, diameter, circumference or area, and the tool first normalizes it back to a radius. If you give radius it is used directly; a diameter is halved; a circumference is divided by 2*pi; an area is turned into a radius by sqrt(area/pi). From that single radius it then derives the complete set: diameter as 2*radius, circumference as 2*pi*radius, and area as pi*radius*radius.
The response also carries pi, the exact constant 3.141592653589793 used in every step, and given, the name of the field you provided, so downstream code always knows which measure was the source of truth.
Outputs and the pi constant
The four geometric values are computed from the recovered radius using the classic relations, so they are internally consistent to the precision you request. The worked example passes radius 1 and returns diameter 2, circumference 6.283185, area 3.141593, pi 3.141592653589793 and given radius, showing how circumference approaches 2*pi and area approaches pi for the unit circle. Because pi is echoed as a literal double rather than pulled from any locale or runtime setting, two calls with the same input on any machine produce byte-identical numbers.
What you can do with it
Engineering and CAD prep
Turn a known bore diameter or target cross-sectional area into radius, circumference and the remaining measures at up to 12 decimals of precision.
Education and worksheets
Demonstrate how radius, diameter, circumference and area relate through pi, using the deterministic unit-circle example as a reference answer.
FAQ
Which inputs can I start from?
Exactly one of radius, diameter, circumference or area. The tool recovers the radius and returns all four measures plus pi.
What does radius 1 return?
diameter 2, circumference 6.283185, area 3.141593 and pi 3.141592653589793, with given set to radius.
How do I find the radius from the area of a circle?
Enter the area as the only measure. The calculator divides it by pi and takes the square root to get the radius, then works out the diameter and circumference from that same radius.
Can I enter the diameter and the area together?
No. The calculator takes exactly one measure, so the results can never contradict each other. If you fill in none, or two or more, it asks you to keep just one.
How many decimals does the circle calculator show?
Six by default. You can choose any whole number from 0 to 12, finer than most calculators for engineering work; a choice outside that range is refused instead of being quietly adjusted.
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/dev/circle \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"radius":1}'const res = await fetch("https://api.kit.forhosting.com/dev/circle", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"radius": 1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/circle",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"radius": 1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/circle", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"radius":1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"radius":1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/circle", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"radius": 1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.circle",
"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
Solving from any single measure
This means you never have to pick a specific solver: whether you start from the size of a pipe's radius, a wheel's diameter, a track's circumference or a plot's area, the same endpoint returns a consistent, fully populated description of the circle.
Outputs and the pi constant
Every call returns six fields: radius, diameter, circumference, area, pi and given.
Validation, precision and errors
The chosen value must be a finite number strictly greater than zero, so zero, negatives, NaN and non-numbers are rejected with a message naming the field. The decimals parameter is an integer from 0 to 12 and defaults to 6, giving finer precision than most calculators for engineering work; a value outside that range is rejected rather than clamped. The tool enforces the exactly-one rule by counting how many of radius, diameter, circumference and area are present; supplying zero or two or more of them throws a typed invalid_input error asking for exactly one. Any non-finite intermediate result also raises invalid_input, so a valid response always contains four clean, finite measurements.
Integration use cases
Programmatic geometry
Call the API to backfill missing circle attributes across a dataset, starting from whichever single measure each record already has.
Technical questions
What happens if I supply two measures?
It returns a typed invalid_input error, because exactly one of the four size fields must be present.
How much precision can I request?
The decimals parameter is an integer from 0 to 12, defaulting to 6, with half-up rounding matching the API.
Is the browser tool free?
Yes, the widget is free (tier A). The API runs on prepaid KIT balance from $0.002 and charges only successful tasks.