Beginner

Perimeter of Rectangle Calculator

Enter the length and width of a rectangle to calculate its perimeter (P = 2(l + w)), area, diagonal, and aspect ratio instantly.
Longer dimension (any unit)
Shorter dimension (same unit)
Perimeter
26

Distance around the outside: P = 2(l + w)

Length
8
Width
5
Area
40
Diagonal
9.434
Aspect ratio
1.6 : 1
l = 8w = 5
P = 2(l + w)
Step by step
  1. 1

    Length + Width

    8 + 5 = 13
  2. 2

    Perimeter = 2 × (l + w)

    2 × 13 = 26
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

The perimeter of a rectangle is P = 2(l + w). Enter length and width to get the perimeter, plus the area (l × w), diagonal (√(l²+w²)), and aspect ratio.

Formula
P = 2(l + w) • Area = l × w • Diagonal = √(l² + w²)
How this is calculated

A rectangle has two pairs of equal opposite sides. The perimeter is the total distance around the outside, which equals two lengths plus two widths: P = 2(l + w). This formula works regardless of which dimension you label the length and which the width — the result is the same either way.

The area, the space enclosed, is l × w. The diagonal is the straight-line distance from one corner to the opposite corner, calculated with the Pythagorean theorem: d = √(l² + w²), because the diagonal is the hypotenuse of a right triangle whose legs are the length and width.

The aspect ratio l/w describes the shape's proportions — a 16:9 display has aspect ratio ≈ 1.78, while a square has aspect ratio exactly 1. If you enter a square (l = w), the perimeter simplifies to 4l and the diagonal becomes l√2 ≈ 1.414l.

Frequently asked questions

The perimeter measures the total boundary length (2l + 2w) in linear units such as metres. The area measures the enclosed surface (l × w) in square units. Both use the same two dimensions but answer different questions: how far around versus how much space inside.

No. The formula P = 2(l + w) is symmetric — swapping the labels gives the same perimeter. By convention, length is usually the longer side.

Yes. A square is a special rectangle with l = w, so the perimeter is 4l and the aspect ratio is exactly 1.

Also known as

rectangle perimeter formula
perimeter of a rectangle
2 times length plus width
rectangle boundary length calculator
perimeter area diagonal rectangle
fence around rectangle calculator
rectangle dimensions perimeter
p equals 2l plus 2w

APA

TG we-Calculate Editorial Team. (2026). Perimeter of Rectangle Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/perimeter-of-rectangle-calculator

Chicago

TG we-Calculate Editorial Team. "Perimeter of Rectangle Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/perimeter-of-rectangle-calculator.

IEEE

TG we-Calculate Editorial Team, "Perimeter of Rectangle Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/perimeter-of-rectangle-calculator

BibTeX

@misc{wecalculate_perimeter_of_rectangle_calculator, title = {Perimeter of Rectangle Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/perimeter-of-rectangle-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?