Maths & numbers

Rectangle calculator

Calculate area, perimeter and diagonal from two side lengths.

Rectangle calculator
Esc to restore

Your inputs

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Area = width × height, perimeter = 2(width + height), and diagonal = √(width² + height²). Use the same length unit for both inputs.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Width
8
Height
5

Example result

Area (square units)
40
Perimeter
26
Diagonal
9.43398113206