Math

Rectangle calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a rectangle calculator?

The rectangle calculator is an all-in-one tool that determines the three quantities people most often need from a rectangle: its area, its perimeter, and the length of its diagonal. You enter the two side lengths and every result appears instantly. The tool is handy for students checking homework, builders estimating materials, and designers laying out floors, screens, or printed pages. Because a rectangle is one of the most common shapes around us, being able to describe it completely from just two measurements is a genuinely useful skill.

Properties of a rectangle

A rectangle is a quadrilateral with four right angles. Its opposite sides are parallel and equal in length, which is why a single pair of measurements — the length and the width — fully describes it. The two diagonals of a rectangle are equal and they bisect each other. When the length and width are equal, the rectangle becomes a square, a special case this calculator also handles correctly.

How does the calculator work?

Choose what you already know. The default mode expects both sides, aa and bb, and from them the calculator returns the area, perimeter, and diagonal. You can also start from one side together with the area, or one side together with the diagonal; the calculator then recovers the missing side first and fills in the remaining results. All inputs accept different units of length, and conversions between them happen automatically.

Formulas

The area is the product of the two sides:

A=a×bA = a \times b

The perimeter is twice the sum of the two sides:

P=2(a+b)P = 2 (a + b)

The diagonal follows from the Pythagorean theorem, since each diagonal is the hypotenuse of a right triangle formed by the two sides:

d=a2+b2d = \sqrt{a^2 + b^2}

where AA is the area, PP is the perimeter, dd is the diagonal, aa is the length, and bb is the width.

Examples

  1. A rectangle with a length of 8 m and a width of 3 m:
A=8×3=24 square metersA = 8 \times 3 = 24 \text{ square meters} P=2(8+3)=22 metersP = 2 (8 + 3) = 22 \text{ meters} d=82+32=738.544 metersd = \sqrt{8^2 + 3^2} = \sqrt{73} \approx 8.544 \text{ meters}
  1. A rectangle with a length of 5 cm and a width of 2 cm:
A=5×2=10 square centimetersA = 5 \times 2 = 10 \text{ square centimeters} P=2(5+2)=14 centimetersP = 2 (5 + 2) = 14 \text{ centimeters} d=52+22=295.385 centimetersd = \sqrt{5^2 + 2^2} = \sqrt{29} \approx 5.385 \text{ centimeters}

Practical notes

  • Always use the same unit for both sides before reading the results; the calculator converts units for you when you select them.
  • The diagonal is always longer than either side and equals the side length multiplied by 2\sqrt{2} when the rectangle is a square.
  • If you only need the area, the dedicated rectangle area calculator is a quicker single-purpose tool, and the rectangle perimeter calculator does the same for the perimeter.

FAQs

How do I find the diagonal of a rectangle?

Square both side lengths, add the squares together, and take the square root of the sum. For sides of 8 and 3 the diagonal is 82+32=738.544\sqrt{8^2 + 3^2} = \sqrt{73} \approx 8.544.

Can this calculator handle a square?

Yes. A square is a rectangle whose two sides are equal, so entering the same value for both sides gives the correct area, perimeter, and diagonal.

How do I find the second side if I know one side and the area?

Divide the area by the known side: b=A/ab = A / a. For an area of 24 and a side of 8, the other side is 24/8=324 / 8 = 3.

Why does the diagonal use the Pythagorean theorem?

A diagonal splits the rectangle into two right triangles whose legs are the two sides. The diagonal is the hypotenuse, so its length is a2+b2\sqrt{a^2 + b^2}.

Report a bug

This field is required.