Rectangle Perimeter Calculator
Find the perimeter of a rectangle from the length and width, or from a side plus the area or diagonal. Enter any two and the rest fill in, with area and diagonal, in any unit.
https://hexacalculator.com/calculators/mathematics/geometry/rectangle-perimeter-calculator
Mathematics
Geometry
Rectangle Perimeter Calculator
Find the perimeter of a rectangle from the length and width, or from a side plus the area or diagonal. Enter any two and the rest fill in, with area and diagonal, in any unit.
Rectangle Perimeter Calculator
Enter any two measurements that include at least one side. The length and width is the simplest pair, but a single side plus the perimeter, the area, or the diagonal also works, and the calculator fills in the rest. The perimeter, area, and diagonal each fit many different rectangles on their own, so one alone, or two of them without a side, cannot pin the shape.
Please input values into the fields
Was this calculator helpful?
It takes one click and shapes what we fix next.
Add as preferred on GoogleShow how the perimeter and area scale
A bar chart of how the perimeter and the area change as the whole rectangle is scaled up or down.
This rectangle perimeter calculator lets you find the perimeter of a rectangle with the given length and width. It also allows you to enter any two known values, including a side together with the perimeter, the area, or the diagonal, in order to calculate the remaining ones. After entering the numbers and selecting the units, the perimeter will be shown as the main result along with the area and diagonal length from one corner to another.
What is the perimeter of a rectangle?
A rectangle is a type of quadrilateral where the opposite sides are equal in length and all angles are right angles. The longer sides are called the length while the shorter sides are called the width (or breadth). The perimeter is the total length of the boundary, i.e., the distance you would travel if you walked around the rectangle once.
Since the lengths of opposite sides are equal, the perimeter is given by adding twice the length and twice the width. Common units for expressing the perimeter include centimeters, meters, feet or inches, where the same unit must be chosen as was used to express the side lengths.
The formula for the perimeter of a rectangle.
Add length and width together and then double that number. This is because each value occurs twice.
In this formula P stands for perimeter, l for length and w for width. Let's say a rectangle has a length of 5 centimeters and a width of 3 centimeters. You add the length and the width together and then multiply that by 2.
Similarly, the perimeter of a flower bed that is 9 feet long and 7 feet wide can be calculated by adding 9 and 7 together to get 16, then multiplying by 2 for a total of 32 feet of material needed to enclose the flower bed. Conversely, if the perimeter is known and one side is sought, divide the perimeter by 2 and subtract the known side.
How to use this calculator:
Enter any two pieces of information contained on a side and specify for each unit. If a valid data set is present the calculation tool will fill in the remaining fields and display the perimeter as the main result. It does not matter which two measurements are entered first.
The length and width combination is the simplest entry option but combinations of one side with perimeter, area or diagonal can also be entered. To start with a different known value delete an entry and enter a new value. By opening shape options you can check the ratio of length to breadth while comparison options allow comparing squares and rectangles with equal perimeters. You can also graphically show how the perimeter and area change when a rectangle is enlarged or reduced.
Calculation by area or diagonal.
It is not necessary to start with two sides. If one side and the area are known, then the other side can be calculated by dividing the area by this side, and then adding the two sides together and doubling it to get the perimeter. The perimeter can be expressed in a single formula as follows:
If one side and the diagonal are known, then it is possible to find either of the other sides using the Pythagorean theorem since a right triangle is formed by the diagonal and the two sides.
These two methods are used by the calculation tools. However, without knowing one side it is not possible to determine two sides if only the perimeter and area or any two of the three values (perimeter, area, diagonal) are given. These combinations can correspond to different rectangles so a side is required to identify which rectangle is meant.
List of all measurements for a rectangle:
Any measurement of a rectangle depends on its length and width. This table summarizes the relationships used by the calculation tools.
Measurement | Symbol | From the length l and width w |
|---|---|---|
Perimeter | P | P = 2 (l + w) |
Area | A | A = l w |
Diagonal | d | from l and w by the Pythagorean theorem |
Aspect ratio | l : w | the length divided by the width |
Examples of calculations.
The following table shows some common perimeters for rectangles. Note that the perimeter is directly proportional to the length of the sides; this is because the sides are added together rather than multiplied.
Length | Width | Calculation | Perimeter |
|---|---|---|---|
5 cm | 3 cm | 2 times (5 + 3) | 16 cm |
10 cm | 4 cm | 2 times (10 + 4) | 28 cm |
9 ft | 7 ft | 2 times (9 + 7) | 32 ft |
12 in | 8 in | 2 times (12 + 8) | 40 in |
It is also easy to calculate the perimeter backwards. For a rectangle with a perimeter of 30 centimeters and a length of 10 centimeters, the width would be equal to 30 divided by 2, minus 10, which gives us a width of 5 cm. If you enter 30 in the "perimeter" column and 10 in the "length" column, the width will immediately appear as well as area and diagonal.
Diagonal and the Pythagorean Theorem
A diagonal is a line that connects two opposite corners. A rectangle has two diagonals of equal length which each divide the rectangle into two congruent right triangles. The length and width are the legs of these triangles, while the diagonal is the hypotenuse, or longest side. So they're related by the Pythagorean theorem.
A rectangle with a length of 3 and a width of 4 has a diagonal of exactly 5. This is the famous 3-4-5 triangle. Since the diagonal is always longer than either side, when TVs or monitors are advertised as being 27 inches they actually measure the diagonal, which means both the actual width and height are less than this value.
Square: Maximum area with equal circumference.
A square is a rectangle with all sides equal in length. Of all rectangles of the same perimeter, the square has the largest area. If you make a rectangle longer and narrower without changing its perimeter, it will have less area. As the rectangle becomes very long and narrow, its area approaches zero.
Thus, a square is the shape that encloses the largest area for any given perimeter. This is also an early form of what is known as the isoperimetric idea, a well-known result in geometry. Of all shapes with straight boundaries and equal perimeters, a circle encloses the greatest area. The compare option allows you to compare a square with the same perimeter as a rectangle, and the areas enclosed by both.
The ratio of length to width and the famous rectangle.
The ratio of length to width is calculated by dividing the length by the width and represents the shape regardless of size. If the ratio is exactly 1, it's a square. A ratio of about 1.618 is a golden rectangle. This ratio has been favored in art and architecture for a long time because if you remove one square from it, what remains is another smaller golden rectangle. A ratio of about 1.414 has the same shape as paper in the A series (e.g. A4). This ratio was chosen so that when the paper is halved, its size is halved but its shape stays the same. A ratio of about 1.778 corresponds to the aspect ratio of widescreen televisions (16:9).
Application examples for the perimeter of a rectangle.
The perimeter answers the everyday question of how long a border is. For builders it tells them how much fence material they need for a rectangular garden, for picture frame makers how long decorative strips have to be to go around a frame, for tailors how long trimmings are needed for the edge of a rectangular tablecloth and for gardeners how much material needs to be laid around a flower bed. As rooms, sports fields, screens, paper and smartphone cases are all rectangles this simple formula is often useful.
Since the perimeter is directly proportional to the length of the sides, doubling both the length and width of a rectangle will double the required amount of fence. The area, however, will quadruple, since it is the product of two sides.
Tips for accurate results:
Make sure both sides are measured in the same unit before calculating perimeter. Length and width cannot simply be added together if one is stated in centimeters and the other is in meters. Measure each side individually and let a calculator do the doubling for you. You don't have to physically walk around the edge of the rectangle yourself. Additionally, area and diagonal calculations are based on the assumption that the corners of the rectangle are exact right angles. So check to make sure all corners are actually right angles before using those results.
Frequently asked questions
What is the formula for perimeter of a rectangle?
The perimeter of a rectangle is calculated with the formula P = 2 × (L + W). For a rectangle with length 5 and width 3 this would be: 2 × (5 + 3) = 16 units. If you add up all four sides, you will get the same result.
How do you find the perimeter of a rectangle with length 7 and width 9?
The result is expressed in units of 32. The sum of the two sides is 7 + 9 which equals 16 and this sum is doubled. 2 x 16 is equal to 32. In feet, you would need a border or fence of 32 feet to go around the figure.
Can you calculate the perimeter from the area?
Yes but you also need to know the length of one side. You divide the area by the known side to find the other side and then use the formula P = 2 × (length + width). In a single equation: P = 2 × Side + 2 × Area ÷ this side. Enter any one side and the area, and the tool will instantly calculate the perimeter.
Can you calculate the perimeter from the diagonal?
Yes, but you also need to know the length of one side. Since the diagonal, length and width form a right triangle, you can use the Pythagorean theorem to calculate the missing side from the diagonal and the known side. If one side of the rectangle is 3 and the diagonal is 5, then the other side is 4, which makes a right triangle with sides 3-4-5. The perimeter is 14.
Which rectangle has the largest area given a certain perimeter?
It is a square. Of all rectangles with the same perimeter, the one with the largest area is a square. The further away from being a square, the more area is lost. So for a given perimeter, a square region will have the greatest possible area.
Related calculators






Disclaimer: This calculator is provided for general informational and educational purposes only. Our calculators are under active development, and results may be inaccurate, incomplete, or unsuitable for your situation. Always verify the figures independently and seek advice from a qualified professional before relying on them. We make no warranties and accept no liability for any loss or decision arising from use of this tool.
References
- Wikipedia: Rectangle
Properties of the rectangle, including its sides, diagonals, area, and the square as a special case.
- Math is Fun: Perimeter
Plain-language explanation of perimeter for rectangles and other shapes.