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).
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.
Choose a mode, enter your numbers, and hit Calculate. Tip: keep length and width in the same unit (the calculator will label results correctly).
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.
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.
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.
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).
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.
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.
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:
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.
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”).
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.
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.
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.
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.
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.
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).
Yes — use “Area + one side” mode and select the known side as width. The calculator will solve the missing length (or width) automatically.
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.
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.
Hand-picked from the Math category to match rectangle & geometry workflows: