MaximCalculator Free, fun & accurate calculators
🟪 Platinum math layout
🌙Dark Mode

Rectangle Calculator

Use this free Rectangle Calculator to get area, perimeter, diagonal, and aspect ratio from length and width. It’s perfect for homework, DIY projects (floors, walls, fabric), design mockups, and “quick sanity checks”. No signup. Works instantly in your browser.

📐Area, perimeter, diagonal + aspect ratio
🧠Solves width from area + length (and vice-versa)
📏Supports common units (in, ft, cm, m)
📱Built for fast screenshots & sharing

Enter your rectangle values

Choose a mode, enter your numbers, and hit Calculate. Tip: keep length and width in the same unit (the calculator will label results correctly).

🧩
📏
↔️
↕️
Your rectangle results will appear here
Enter your values and tap “Calculate” to see area, perimeter, diagonal, and ratio.
Tip: If you have area and one side, switch the mode to solve the missing side.
Aspect ratio bar: closer to 1.00 means “more square”; bigger means “more stretched”.
Square-ishBalancedStretched

This rectangle calculator is intended for general educational and DIY use. For engineering or safety-critical work, confirm with appropriate standards and measurements.

🧮 Formula breakdown

Rectangle formulas (area, perimeter, diagonal)

A rectangle is one of the cleanest shapes in geometry: it has four sides, opposite sides are equal, and all interior angles are 90°. That simplicity gives us formulas that are fast, reliable, and useful in everyday life. Below are the four main quantities this calculator returns and how each one works.

1) Area

The area of a rectangle is the amount of 2D space it covers. If you imagine the rectangle as a grid of unit squares, area tells you how many squares fit inside. The formula is: Area = Length × Width. If length and width are measured in the same unit (say, feet), the result is in “square feet” (ft²). That square unit is important: area is always “unit squared” because it measures surface.

2) Perimeter

The perimeter is the total distance around the boundary of the rectangle. Think: the length of a fence you’d build around a garden, or the trim you’d install around a wall. A rectangle has two lengths and two widths, so you add them up: Perimeter = 2 × (Length + Width). Perimeter uses a normal “linear” unit (ft, m, cm) because it’s a distance, not a surface.

3) Diagonal

The diagonal is the corner-to-corner distance. It matters for screens (TV diagonal size), for squaring a frame in woodworking, and for checking whether a rectangle is “true” (right angles). The diagonal forms a right triangle with the length and width, which means we can use the Pythagorean theorem: Diagonal = √(Length² + Width²). This result is in the same unit as the sides (because it’s also a distance).

4) Aspect ratio

The aspect ratio describes the rectangle’s “shape vibe” — how stretched it is. It’s the long side divided by the short side: Aspect Ratio = max(Length, Width) ÷ min(Length, Width). Because it’s a ratio of two lengths with the same unit, the units cancel out. A perfect square has an aspect ratio of 1.00. A 16:9 screen has a ratio of 16/9 ≈ 1.78.

Bonus: Solve for a missing side

Sometimes you know the area but only one side. For example: you want a rug with 48 ft² area, and you know it must be 6 ft long. The missing width is just: Width = Area ÷ Length. This calculator’s “Area + one side” mode does exactly that, and then computes perimeter and diagonal too.

🛠️ How it works

What happens when you press Calculate

This page runs the math in your browser (JavaScript) the moment you click the button. Nothing is uploaded, and there’s no waiting. Here’s the flow, in plain English:

  • Step 1 — Read inputs: The calculator reads your selected mode, units, and values.
  • Step 2 — Validate: It checks for missing fields and makes sure numbers are positive.
  • Step 3 — Solve the rectangle:
    • If you choose “Length + width”, it uses those directly.
    • If you choose “Area + one side”, it divides area by the known side to find the missing one.
  • Step 4 — Compute outputs: Area, perimeter, diagonal, and aspect ratio are calculated.
  • Step 5 — Format nicely: Results are rounded, labeled with units, and displayed in the result box.
  • Step 6 — Optional save/share: You can save results locally or share a formatted summary.

The “aspect ratio bar” is a small visual trick for fast intuition: squares cluster near the left, while very wide rectangles push the bar to the right. It’s not a scientific meter — it’s just a quick visual for “how stretched is this rectangle?”

The save feature stores up to 20 recent rectangle checks on your device using localStorage, so if you’re comparing multiple rooms or designs, you can keep a mini history without spreadsheets.

📌 Worked examples

Examples you can copy (DIY + school friendly)

Example 1: Simple area and perimeter

Suppose a rectangle has length 12 ft and width 8 ft. The area is 12 × 8 = 96 ft². The perimeter is 2 × (12 + 8) = 2 × 20 = 40 ft. The diagonal is √(12² + 8²) = √(144 + 64) = √208 ≈ 14.422 ft. The aspect ratio is 12/8 = 1.50 (often read as “3:2”).

Example 2: Find a missing side from area

You need a poster that covers 720 cm², and you want it to be 30 cm long. Width = Area ÷ Length = 720 ÷ 30 = 24 cm. Then perimeter = 2 × (30 + 24) = 108 cm and diagonal = √(30² + 24²) = √(900 + 576) = √1476 ≈ 38.418 cm. Aspect ratio is 30/24 = 1.25.

Example 3: Screen diagonal check

Screens are often described by their diagonal. If a monitor is 16:9 and has a diagonal of 27 inches, you can reverse engineer approximate width and height (that’s a separate calculator), but you can also do a fast check: if the width is about 23.5 in and the height about 13.2 in, diagonal ≈ √(23.5² + 13.2²) ≈ √(552.25 + 174.24) ≈ √726.49 ≈ 26.95 in, which matches a “27 inch class” screen.

Example 4: Paint / flooring sanity check

A room is 4.2 m by 3.6 m. Area = 4.2 × 3.6 = 15.12 m². If each box of flooring covers 1.5 m², you’ll need 15.12 / 1.5 = 10.08 → 11 boxes (always round up). This calculator gives you the room area instantly; then you can divide by your product coverage.

Notice the meta-pattern: area helps with coverage and quantity, perimeter helps with borders and trim, and diagonal helps with “is this square / will this fit / what’s the corner-to-corner measurement?” If you keep those use-cases straight, rectangles stop being “geometry” and start being a superpower.

❓ FAQ

Frequently Asked Questions

  • Do length and width matter, or can I swap them?

    You can swap them — a rectangle with 12 by 8 is the same shape as 8 by 12. The calculator will still compute the same area, perimeter, and diagonal. Aspect ratio is reported as long side ÷ short side, so it stays ≥ 1.

  • Why is area shown in square units (ft², m²)?

    Area measures a surface. If your sides are measured in feet, the “unit squares” inside the rectangle are 1 ft by 1 ft, which is 1 ft². That’s why you see the squared symbol.

  • What if I only know the diagonal?

    If you know only the diagonal, there are infinite rectangles that could match it. You need one more piece of information (like length, width, or aspect ratio).

  • Can this calculate the length from area and width?

    Yes — use “Area + one side” mode and select the known side as width. The calculator will solve the missing length (or width) automatically.

  • How accurate are the results?

    The math is exact. Any inaccuracy comes from your measurement precision and rounding. If you enter values with more decimal places, you’ll get more precise outputs.

  • What’s a “good” aspect ratio?

    There’s no universal “best” aspect ratio — it depends on purpose. Many screens use 16:9 (~1.78). Many photos use 4:3 (~1.33). Many posters and prints use ratios like 3:2 (1.5) or A-series paper (~1.414). In practical DIY, ratio just helps you compare shape quickly.