Skip to main content
Rectangle calculator

Area, perimeter and diagonal in one place.

Type the length and width of any rectangle and read the area, the perimeter, the diagonal and the aspect ratio at once, each with the formula shown so you can see exactly where the number comes from.

The rectangle

cm
cm

The unit is a label only. It does not change the math: length times width gives area in square units, and the perimeter and diagonal come out in the same linear units you typed.

Area
0
square units

What these numbers tell you

    Every measure, with its formula

    Solve for a missing side

    Know the area or the perimeter and one side? Enter them and read the length of the side you are missing.

    cm^2
    cm

    Real rectangles for comparison

    A few everyday rectangles and their area, perimeter and diagonal, so the numbers have something to lean on.

    ExampleLength x WidthArea PerimeterDiagonal

    Rectangles, explained

    How to find the area and perimeter of a rectangle

    A rectangle is a four-sided shape with two pairs of equal, parallel sides and four right angles. Its area is length times width, written A = L * W, and it counts how many unit squares fit inside the shape. Its perimeter is the distance all the way around, which is 2 * (L + W) because there are two lengths and two widths.

    The key thing to remember is that these two answers use different units. Area is always in square units such as square centimeters or square feet, because you multiplied two lengths together. Perimeter is in plain linear units, the same units you measured the sides in. A room can have a large area but a short perimeter, or the reverse, so the two numbers answer different questions.

    The diagonal and the Pythagorean theorem

    The diagonal of a rectangle is the straight line from one corner to the opposite corner. It splits the rectangle into two right triangles whose legs are the length and the width, so the diagonal is the hypotenuse. That is why it follows the Pythagorean theorem: diagonal = sqrt(L^2 + W^2). Square the length, square the width, add them, then take the square root.

    This is the same measurement used for screens. A television or monitor sold as a 55 inch model is 55 inches along its diagonal, not its width, which is why two screens with the same diagonal can look different once you factor in their aspect ratio. The diagonal is also handy on a job site: measuring it is the fastest way to check that a frame or a layout is truly square.

    Aspect ratio, squares and real examples

    The aspect ratio compares the length to the width, written L : W. When both sides are whole numbers the ratio can be reduced by the greatest common divisor for a clean form, so 8 by 5 becomes 8 : 5 and 16 by 9 stays 16 : 9, the shape of most modern screens. When one side equals the other the ratio is 1 : 1 and the rectangle is a square, a rectangle in every way with the extra rule that all four sides match.

    Rectangles are everywhere once you look. A sheet of Letter paper is 8.5 by 11 inches, a small bedroom is close to 12 by 10 feet, a tennis court is 78 by 27 feet, and a quarter-acre building lot is roughly 105 by 105 feet. The same three formulas, area, perimeter and diagonal, describe all of them, and this calculator also solves the reverse problem: give it the area or perimeter and one side, and it returns the side you are missing.

    Common questions

    What is the formula for the area of a rectangle?

    Area equals length times width, A = L * W. Multiply the two side lengths and the answer is in square units, such as square feet if you measured the sides in feet. For a square, where length and width are equal, this is the same as side times side.

    What is the difference between area and perimeter?

    Area is the space inside the rectangle and is measured in square units, from length times width. Perimeter is the distance around the outside and is measured in plain linear units, from 2 * (L + W). Use area for paint, carpet or land, and perimeter for fencing or trim.

    How do you find the diagonal of a rectangle?

    The diagonal is the hypotenuse of the right triangle made by the length and width, so it uses the Pythagorean theorem: diagonal = sqrt(L^2 + W^2). Square each side, add the two results, then take the square root. This is how screen sizes are measured.

    Is a square a rectangle?

    Yes. A square is a rectangle in which the length equals the width, so all four sides are the same and all four angles are still right angles. Every square is a rectangle, but a rectangle is only a square when its two side lengths match.

    All math runs in your browser, nothing is uploaded. Results are exact for the length and width you enter, so measure carefully and the rectangle figures will be precise.