ForHosting KIT · Math

Circle around a square calculator

Get the radius of the circle that passes through all four corners of a square: it is the side times √2/2, so a side of 1 gives about 0.7071. Useful for round cutouts, clearance holes and circular hit areas in games. 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
Side
2
You get
Radius
1.4142135624

The circumscribed circle of a square is the unique circle that passes through all four vertices—the smallest circle that fully encloses the square. Its radius is half the square diagonal, so once you know the side length s you only need R equals s times the square root of two over two. Designers packing square tiles into round cutouts, CNC operators sizing clearance holes, game developers placing circular hitboxes on square sprites, and students checking geometry homework all need that enclosing radius without re-deriving the diagonal each time. This circle-around-a-square calculator accepts a single positive side length, applies the closed form, and returns the radius together with a short formula string you can show next to the answer.

What the circumscribed circle of a square is and why the formula is closed form

A square has four equal sides and four right angles. The longest distance inside the square is the diagonal, which joins opposite corners and measures s times the square root of two by the Pythagorean theorem: both legs of the right triangle formed by two sides and the diagonal equal s, so the hypotenuse is the square root of s squared plus s squared, which simplifies to s times the square root of two.

The circumscribed circle—also called the circumcircle or the enclosing circle around the square—has that diagonal as its diameter, because the circle must pass through all four vertices and the centre of the square is the midpoint of either diagonal. Therefore the circumradius R is exactly half the diagonal: R equals s times the square root of two, all over two.

Equivalent algebraic forms include R equals s over the square root of two, and R equals s times the square root of two over two; they are identical after rationalising the denominator. This is not the same as the inscribed circle (incircle), whose radius is only half the side and touches the midpoints of the sides rather than the corners.

Searchers looking for a circle around a square calculator almost always want the outer enclosing radius for packing, clearance, or bounding geometry, so this tool reports only that circumradius and does not mix in apothem or area.

Where the circle around a square is needed

Classrooms and tutoring platforms use a circle around a square calculator so learners can check the half-diagonal identity for arbitrary side lengths without mis-applying the square root of two. Exam-prep generators need a deterministic oracle that marks zero and negative sides as invalid instead of silently returning nonsense radii a buggy grader might accept. Game and map engines that use square cells convert side length to vertex radius when placing circular collision shapes or camera bounds on axis-aligned sprites.

Failed validation does not consume balance. Keep requests small, pin the rounded radius in tests, and you get reproducible enclosing radii for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own. Fabrication shops can batch-convert a list of square stock sizes into minimum circle stock diameters by doubling the returned radius when ordering round bar or sheet.

Classroom and homework checks

Let students submit a positive square side length and verify the enclosing circumradius against R=s·√2/2 without hand-computing square roots incorrectly.

CAD, packing, and fabrication clearances

Convert a known edge of a square plate or tile into the circumscribed-circle radius for packing into round stock, laser paths, and outer clearances.

Games and UI collision bounds

Map square sprite or cell side lengths to circular hitbox radii when placing assets on a shared circumcircle in engines and layout tools.

What happens if the side is zero or negative?

A geometric side length must be strictly positive; zero and negative values are rejected and not billed.

Is the circumscribed circle the same as the inscribed circle?

No. The circumscribed (enclosing) circle passes through the vertices with radius s·√2/2. The inscribed circle touches the side midpoints with radius s/2. This tool returns only the enclosing radius.

Why is the formula half the diagonal?

The square diagonal is s√2 by Pythagoras and is also the diameter of the unique circle through all four corners, so the radius is half of that: R = s·√2/2.

How big must a round hole be for a square to fit?

Its diameter must equal the square's diagonal, the side times √2, so its radius is half of that. A square with a side of 2 needs a radius of √2, the smallest circle that touches all four corners.

What unit does the result use?

The same unit as the side you enter. The calculator does not convert units, so a side in millimetres gives a radius in millimetres and a side in inches gives a radius in inches.

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/geom/circle-circumscribed-square

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/geom/circle-circumscribed-square \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"side":2}'
{
  "side": 2
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "geom.circle_circumscribed_square",
  "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.

Zero or negative side lengths fail with invalid_input instead of a silent NaN.

Input contract, response shape, and error behaviour

On success the body includes the echoed side, the enclosing radius rounded to twelve decimal places for stable goldens across runtimes, and a formula string restating R equals s times the square root of two over two. Example: side equals two yields radius approximately one point four one four two one three five six two three seven three, because half of two times the square root of two is the square root of two itself. Side equals one yields half the square root of two, about zero point seven zero seven one. Keep units consistent yourself: the calculator is unit-agnostic, so if side is in millimetres the radius is in millimetres. POST a JSON body with one required field: side, the finite positive side length of the square. The value may arrive as a JSON number or as a numeric string; non-finite values, missing fields, empty strings, and non-numeric text fail with invalid_input naming the field. Pair the response with your own drawing code if you need a sketch of the circumcircle or the two diagonals; this endpoint computes the scalar radius only and does not emit SVG, step-by-step prose beyond the formula field, or related metrics such as area, perimeter, or inradius. Extremely large finite sides remain valid as long as the IEEE floating result stays finite; non-finite intermediate results would fail the finite-number checks on input rather than return Infinity as a success payload. String sides such as scientific notation that parse to a positive finite number are accepted the same way as bare JSON numbers.

Where a circle-around-a-square API earns its keep

Architecture and product-design notebooks often size square plates, tiles, or UI cards from a known edge and need the bounding circle for packing, laser cutouts, or round mounting holes; calling a tiny parse API avoids pulling a full computer-algebra system for a one-parameter special case.

How do I compute the enclosing circle radius of a square from side length?

Send a finite positive number side. The API returns R = s·√2/2, the radius of the circle through all four vertices, plus a short formula string.

What does the circle around a square calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →