Rectangle Calculator
Calculate a rectangle's area, perimeter, diagonal, inscribed/circumscribed circle radii, and aspect ratio from any two known measurements — length & width, area & one side, perimeter & one side, diagonal & one side, or area & perimeter. Also flags how close the result sits to a golden-ratio rectangle.
Input
Pick the two values you know; the rest are calculated from them.
Output
| Metric | Value |
|---|---|
| No data yet | |
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/rectangle-calculator \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"calcMode": "length_width",
"length": "8",
"width": "6",
"unit": "cm",
"precision": "4"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `rectangle-calculator` tool (Rectangle Calculator) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/rectangle-calculator/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Rectangle Calculator — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per API/MCP call | From 5 credits |
|---|---|
| Need more credits? | View pricing |
Also available with
Guides
Work out a rectangle's full geometry — area, perimeter, diagonal, inscribed and circumscribed circle radii, and aspect ratio — from any two measurements you already have. Most rectangle calculators only take length and width; this one also solves from an area, perimeter, or diagonal paired with a single side, which is useful when you're reverse-engineering a shape from a spec sheet, a print layout, or a floor plan that only gives you some of the numbers.
How to use it
- Pick Solve from — the pair of values you know: length & width, area & one side, perimeter & one side, diagonal & one side, or area & perimeter together.
- Enter those two values. Pick a unit if you want it carried through the results (or leave it unitless).
- Choose a decimal precision for the output.
The tool fills in every other dimension, plus:
- Inscribed circle radius — the largest circle that fits entirely inside the rectangle (half the shorter side).
- Circumscribed circle radius — the smallest circle passing through all four corners (half the diagonal).
- Aspect ratio — the longer side to the shorter side, as both a decimal and an
X:1ratio. - Golden ratio check — how far the aspect ratio sits from φ ≈ 1.618, and whether it's close enough (within 1%) to call it a golden rectangle.
The math
Given length L and width W:
- Area =
L × W - Perimeter =
2(L + W) - Diagonal =
√(L² + W²)
For the other solve modes, the tool first recovers L and W:
- Area + one side: the missing side = area ÷ known side.
- Perimeter + one side: the missing side = perimeter/2 − known side.
- Diagonal + one side: the missing side =
√(diagonal² − known side²). - Area + perimeter:
LandWare the two roots ofx² − (perimeter/2)x + area = 0— the larger root is the length, the smaller is the width.
Why does it check for the golden ratio?
A rectangle whose sides are in golden-ratio proportion (about 1.618:1) is a common target in print layouts, card design, and photo composition because it reads as naturally balanced. If you're deliberately aiming for that proportion instead of checking an existing rectangle against it, the Golden Ratio Calculator solves the split directly from a total, larger, or smaller segment.
What if I only have area and a diagonal, not a side?
That combination doesn't pin down a unique rectangle — infinitely many length/width pairs share the same area and diagonal — so it isn't one of the eight solvable modes here. You need at least one side length, a perimeter, or both area and perimeter together.