ForHosting KIT · Math

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
Use it from WebAPIEmailTelegramApp soon
If you enter
Radius
1
You get
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.

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.

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.

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/dev/circle

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/dev/circle \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"radius":1}'
{
  "radius": 1
}
{
  "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.

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.

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.

Programmatic geometry

Call the API to backfill missing circle attributes across a dataset, starting from whichever single measure each record already has.

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.

Read the full KIT documentation →