Rectangle calculator

Enter what you know about the rectangle and let the tool calculate the rest.
Note: You can use mathematical expressions.

A rectangle is a geometric shape with four sides where all angles are 90°. If all the sides of a rectangle have the same length it's usually called a square instead.

The word rectangle comes from the Latin word rectangulus, a combination of rectus (right) and angulus (angle), which refers to the rectangle's four right angles (90°).

Rectangles are often depicted with the longest sides horizontally and the shorter sides vertically. The distance between the vertical sides are often called the base, while the distance between the horizontal sides are called the height.

When calculating a rectangle's diagonal, perimeter and area it does not matter which side is the base and which side is the height. The tool therefore uses the more neutral naming, a and b. If neither of them are specified there can often be multiple solutions. For example, a rectangle with perimeter 10 and area 6 has the sides 2 and 3, but it is unclear if it is a that is 2 and b that is 3 or if it's the other way around. In these situations the tool will just show one of the two possible solutions.

The area of a rectangle can easily be calculated by multiplying the length of side a and b. To get the perimeter the sum of a and b is multiplied by 2 (because the opposite sides are identical). The diagonal can be calculated using the Pythagorean theorem.

Diagonal = √ a² + b² 
Perimeter = 2a + 2b
Area = a×b
Geometric shapes: Circle, Parallelogram, Rectangle, Square, Trapezium, Triangle