Last updated: August 1, 2026
Length and Width Given Perimeter Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Quick Answer
This calculator finds both rectangle dimensions when perimeter and one side are known. It halves the perimeter to get the side sum, subtracts the known side to get the missing side, and returns the dimensions in longer-side and shorter-side order.
With the given perimeter and side, the rectangle length is {length} and the width is {width}.
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
If perimeter = 2(length + width), then the unknown side equals P/2 - knownSide. The two dimensions are knownSide and P/2 - knownSide.
Where:
- P=Rectangle perimeter
- k=Known side length
- l=Rectangle length
- w=Rectangle width
Worked Examples
Perimeter 30, known side 7
The missing side is one unit longer.
- 1Compute the semi-perimeter: 30/2 = 15.
- 2Subtract the known side: 15 - 7 = 8.
- 3The rectangle dimensions are 8 and 7.
Perimeter 24, known side 6
A square satisfies the same formula.
- 1Semi-perimeter = 12.
- 2Other side = 12 - 6 = 6.
- 3Both sides match, so the shape is a square.
Perimeter 25.5, known side 5.5
Decimal inputs work the same way.
- 1Semi-perimeter = 12.75.
- 2Other side = 12.75 - 5.5 = 7.25.
- 3The solved dimensions are 7.25 and 5.5.
Perimeter 40, known side 9
A larger rectangle with integer output.
- 1Semi-perimeter = 20.
- 2Other side = 20 - 9 = 11.
- 3The rectangle dimensions are 11 and 9.
Introduction
This rectangle calculator solves the simplest reverse-side problem: you know the perimeter and one side, and you want the other side immediately. Because a rectangle has two pairs of equal sides, the missing dimension is just the semi-perimeter minus the known side.
The core rectangle relationship
Perimeter adds all four sides, so P = 2(length + width). Dividing by 2 gives the sum of one length and one width, which is exactly what you need to isolate the missing side.
Perimeter is twice the sum of adjacent sides.
Half the perimeter equals length + width.
Subtract the known side to reveal the other side.
Step-by-step method
First halve the perimeter. Then subtract the known side. The result is the other dimension. The calculator also sorts the outputs so the longer side is labeled length.
Find P/2.
Compute P/2 - knownSide.
Assign the larger value to length.
Input checks
A valid rectangle needs positive side lengths. That means the known side must be less than the semi-perimeter, otherwise the other side would be zero or negative.
Perimeter must be greater than 0.
Known side must be greater than 0.
Known side must be smaller than P/2.
When the rectangle is a square
If the known side equals the missing side, the rectangle is a square. That occurs precisely when the known side equals one quarter of the perimeter.
Square side = perimeter / 4.
Both returned dimensions will match.
The formula still works without any special branch.
Common errors
People often enter the full sum of two adjacent sides instead of the full perimeter, or they use a side that is too large for the given perimeter.
Do not enter length + width in place of perimeter.
Do not forget that perimeter includes all four sides.
Watch for impossible cases where knownSide ≥ P/2.
Practical uses
This is useful in framing, room planning, worksheet problems, and inventory layout whenever one edge and the border total are already known.
Checking room dimensions from a tape measurement.
Solving geometry homework quickly.
Estimating opposite side lengths in a layout sketch.
FAQs
Why does the formula use half the perimeter?
Half the perimeter equals one length plus one width, which is the pair of adjacent sides needed to isolate the missing dimension.
What if the known side equals half the perimeter?
Then the other side would be zero, so the measurements do not describe a real rectangle.
Can this calculator produce a square?
Yes. If the known side is exactly one quarter of the perimeter, both dimensions come out equal.
Does it matter whether the known side is called length or width?
No. The calculator sorts the two solved dimensions and labels the larger one as length.
Can I use decimal measurements?
Yes. Any positive decimal value is valid as long as the known side is smaller than half the perimeter.
How do I verify the answer?
Add the reported length and width, double the result, and confirm it matches the original perimeter.