CalcKit CalcKit
My Calculators
Sign in Sign up

Rectangle Calculator

Rectangle Calculator

Table of Contents

Rectangle Definition

Rectangle with its length a, width b and diagonal d

A rectangle is a type of quadrilateral with four straight sides and four right angles, whose opposite sides are equal and parallel.

The word rectangle comes from Latin rectangulus. It's a combination of rectus (which means "right, straight") and angulus (an angle).

Parts of a Rectangle

The six parts of a rectangle mentioned in this tool are length (a), width (b), area (A), perimeter (P), diagonal (d) and circumradius (R).

Length (a)

Length a of a rectangle, its longer side

The length of a rectangle is the longer side of the rectangle.

It can be found with the following formulas:

  • If you know the width and the perimeter of the rectangle:

    a = (P - 2 * b) / 2

  • If you know the width and the area:

    a = A / b

  • If you know the width and the diagonal:

    a = √(d² - b²)

Width (b)

Width b of a rectangle, its shorter side

The width of a rectangle is the shorter side of the rectangle.

You can determine it with these formulas:

  • If you know the length and the perimeter of the rectangle:

    b = (P - 2 * a) / 2

  • If you know the length and the area:

    b = A / a

  • If you know the length and the diagonal:

    b = √(d² - a²)

Area (A)

Area A of a rectangle, the region inside it

The area of a rectangle is the region enclosed inside the rectangle.

It can be calculated with the following formula:

A = a * b

Perimeter (P)

Perimeter P of a rectangle, its four sides together

The perimeter of a rectangle is the distance around the boundary of the rectangle.

You can find it with the following formula:

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

Diagonal (d)

Diagonal d of a rectangle, from one corner to the opposite corner

The diagonal is the length of a line stretching from one corner of the rectangle to the opposite corner through the center of the rectangle.

The diagonal of the rectangle cuts the rectangle in two right triangles. The length and width are the side lengths of a triangle; therefore, we can use the diagonal as the hypotenuse of the triangle.

In this case, the Pythagorean theorem can be applied:

d² = a² + b²

which simplifies to:

d = √(a² + b²)

Circumradius (R)

Circumradius R of a rectangle, the radius of the circle through its four corners

The circumradius is the radius of a circle which is drawn outside a rectangle touching all four vertices (corners) of the rectangle.

From the drawing above, we can clearly understand the circumradius is half of the diagonal of the rectangle.

Therefore, the formula of the diagonal should be divided by 2:

R = d / 2 = √(a² + b²) / 2

Angle of the diagonal

The diagonal makes an angle (θ) with the length, and 90 - θ with the width:

θ = atan(b / a)

The two diagonals cross at the center, at an angle of 2 * θ, and its supplement, 180 - 2 * θ. The calculator doesn't show these angles.

Example

A rectangle 8 long and 6 wide:

  1. Area:

    A = 8 * 6 = 48

  2. Perimeter:

    P = 2 * (8 + 6) = 28

  3. Diagonal:

    d = √(8² + 6²) = √100 = 10

  4. Circumradius:

    R = 10 / 2 = 5

  5. Angle of the diagonal:

    θ = atan(6 / 8) = 36.87°

Frequently asked questions

How do you find the length and width from the area and perimeter?

They are the two solutions of x² - (P / 2) * x + A = 0. For an area of 48 and a perimeter of 28: x² - 14x + 48 = 0, so the sides are 8 and 6. The Quadratic Equation Solver solves it.

What is the largest rectangle in a circle?

A square, whose diagonal is the circle's diameter. Any rectangle in a circle has the diameter as its diagonal, which is why the circumradius is half the diagonal.