Rectangle Calculator

Calculate rectangle area, perimeter, and diagonal from length and width. Enter both dimensions to get all measurements instantly.

Dimensions

Area = length × width  ·  Perimeter = 2(l + w)  ·  Diagonal = √(l² + w²)

LWd
Results
Area: 24.0000 square units
Perimeter: 20.0000 units
Diagonal: 7.2111 units

What is a rectangle calculator?

A rectangle calculator computes the area, perimeter, and diagonal of a rectangle from its length and width. You enter the two dimensions—length (usually the longer side) and width (the shorter side)—and the tool gives you the area (length × width), the perimeter (2 × (length + width)), and the diagonal (the straight line from one corner to the opposite corner using the Pythagorean theorem). No sign-up or download is required; the calculator runs in your browser and is useful for homework, room layout, flooring, fencing, and any task involving rectangular shapes.

Rectangles are everywhere: rooms, screens, plots of land, picture frames, and many manufactured products. Knowing the area helps with material coverage (paint, carpet, turf); the perimeter helps with borders and fencing; the diagonal is used in design, carpentry, and when checking if an object fits through a space. This free rectangle calculator gives you all three from two inputs, in whatever units you use—meters, feet, inches—as long as length and width are in the same unit.

How to use this rectangle calculator

Enter the length and width of your rectangle in the two input fields. Both must be positive numbers; you can use decimals (e.g. 5.5) or whole numbers (e.g. 10). As soon as both values are valid, the results appear: area in square units, perimeter in units, and diagonal in units. The formulas are shown under the inputs: area = length × width, perimeter = 2(l + w), diagonal = √(l² + w²). If you leave a field empty or enter zero or a negative value, the calculator will prompt you to enter positive dimensions. Use the same unit for length and width; area will be in square units and perimeter and diagonal in the same linear unit.

Rectangle area formula

The area of a rectangle is A = length × width (often written A = l × w or A = lw). For example, a room 6 meters long and 4 meters wide has area 6 × 4 = 24 square meters. Area is the amount of space inside the rectangle and is always in square units. Use it when you need to cover a rectangular surface—flooring, paint, grass seed—or when you need to know how much space a rectangular plot or screen occupies. The rectangle calculator applies this formula so you get an accurate area without doing the multiplication by hand.

Perimeter formula

The perimeter of a rectangle is the total distance around it: P = 2 × (length + width), or P = 2l + 2w. So for a 6 by 4 rectangle, the perimeter is 2 × (6 + 4) = 20 units. Perimeter is a length, so it uses the same unit as length and width. Use it when you need the length of fencing for a rectangular yard, the trim around a rectangular frame, or the border of a rectangular garden. The calculator gives you the perimeter as soon as you enter valid length and width.

Diagonal of a rectangle

The diagonal of a rectangle is the line from one corner to the opposite corner. It splits the rectangle into two right triangles. By the Pythagorean theorem, diagonal d = √(length² + width²). For length 6 and width 4, d = √(36 + 16) = √52 ≈ 7.21 units. The diagonal is useful in construction (squaring a frame), design (screen size is often given as diagonal), and when checking whether a rectangular object can fit through a door or opening. This calculator computes the diagonal from the same length and width you enter for area and perimeter.

Square as a special rectangle

A square is a rectangle with length equal to width. So you can use this rectangle calculator for squares too: enter the same value for length and width. The area becomes side², the perimeter 4 × side, and the diagonal side × √2. For example, a square with side 5 has area 25, perimeter 20, and diagonal 5√2 ≈ 7.07. The formulas are the same; the rectangle calculator handles squares without any extra step.

Applications of rectangle calculations

Rectangle area, perimeter, and diagonal are used in many fields. In construction and home improvement, area determines flooring and paint quantities; perimeter is used for baseboards and fencing. In real estate, room and lot sizes are often given as length and width; area is used for pricing and comparison. In design and manufacturing, rectangular dimensions and diagonals (e.g. screen size) are standard. In education, rectangle formulas are a core part of geometry. This rectangle calculator gives you quick, accurate results for any of these uses. Always keep units consistent: same unit for length and width, square units for area, and the same linear unit for perimeter and diagonal.

Summary

This rectangle calculator finds the area, perimeter, and diagonal of a rectangle from the length and width. Enter both dimensions (positive numbers) and get area = length × width, perimeter = 2(l + w), and diagonal = √(l² + w²) instantly. The tool is free, runs in the browser, and requires no account. Use it for rooms, plots, frames, or any rectangular shape. Squares are supported by entering the same value for length and width. Keep units consistent for accurate results.