Skip to main content
Skip to calculator
Advertisement

Last updated: August 1, 2026

Length of a Rectangle Calculator

Quick Answer

This calculator finds rectangle length from width plus one extra measurement: area, perimeter, or diagonal. It applies the correct inverse formula for the chosen mode, rejects impossible inputs, and reports validation values for the solved rectangle.

Using the selected method, the rectangle length is {length}.

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

Formula

Area mode: length = A / w. Perimeter mode: length = P/2 - w. Diagonal mode: length = √(d² - w²).

Where:

  • w=Known width
  • A=Area
  • P=Perimeter
  • d=Diagonal
  • l=Rectangle length
Length of a Rectangle CalculatorInputsEnter the known valueswith consistent units.FormulaArea mode: length = A / w. Perimeter mode: length = P/2 - w. Diagonal mode: length = √(d² - w²).OutputsRead the computedrectangle length and checks.
Visual workflow for the length of a rectangle calculator.

Worked Examples

Area and width

Use the area formula l = A / w.

  1. 1Take the area 48 and divide by width 6.
  2. 2Length = 48/6 = 8.
  3. 3The rectangle is 8 by 6.
Final Answer: Length = 8

Perimeter and width

Use the perimeter relationship.

  1. 1Half the perimeter is 15.
  2. 2Subtract the known width: 15 - 7 = 8.
  3. 3Length = 8.
Final Answer: Length = 8

Diagonal and width

Apply the Pythagorean theorem.

  1. 1Compute d² - w² = 10² - 6² = 64.
  2. 2Take the square root: √64 = 8.
  3. 3Length = 8.
Final Answer: Length = 8

Decimal diagonal case

Non-integer dimensions are supported.

  1. 1Subtract the square of the width from the square of the diagonal.
  2. 2Take the square root of the result.
  3. 3Use the solved length with the original width for verification outputs.
Final Answer: Length ≈ 8.072174

Introduction

A rectangle length can be recovered in several ways once the width is known. This calculator lets you choose the method that matches your data—area, perimeter, or diagonal—and then returns the solved length together with check values for the full rectangle.

Choose the right method

Different problems give different known measurements. This calculator uses one width plus one additional measurement, then applies the corresponding rectangle formula.

  • Area with width uses multiplication reversal.

  • Perimeter with width uses the side-sum relationship.

  • Diagonal with width uses the Pythagorean theorem.

Area-and-width mode

If the area is known, divide the area by the width. This is the direct inverse of A = length × width.

  • Area must be positive.

  • Width must be positive.

  • Length grows linearly as area increases.

Perimeter-and-width mode

If the perimeter is known, halve it to get length + width, then subtract the width. The perimeter must be large enough to allow a positive length.

  • Use P/2 first.

  • Then compute P/2 - width.

  • Perimeter must exceed 2 × width.

Diagonal-and-width mode

A rectangle diagonal forms a right triangle with the length and width. Rearranging d² = l² + w² gives length = √(d² - w²).

  • Diagonal must be larger than width.

  • The square-root input must stay positive.

  • This is the geometric inverse of the Pythagorean theorem.

Validation and impossible cases

Each mode has its own checks, but the basic rule is the same: every measurement must describe a real rectangle with positive side lengths.

  • Reject width ≤ 0.

  • Reject area ≤ 0 in area mode.

  • Reject perimeter ≤ 2w in perimeter mode.

  • Reject diagonal ≤ width in diagonal mode.

Practical use cases

These reverse formulas are useful in drafting, shopping for materials, homework, and checking whether a given diagonal or perimeter is compatible with a measured width.

  • Flooring and tile layout checks.

  • Architecture and drafting sketches.

  • Analytic geometry and algebra practice.

FAQs

Why is width required in every mode?

Each mode solves for length from one other measurement plus width. Without width, the rectangle is not uniquely determined.

Which method should I choose?

Choose the mode that matches the measurement you already know along with the width: area, perimeter, or diagonal.

Why must the diagonal be larger than the width?

In a real rectangle, the diagonal is the hypotenuse of a right triangle, so it must be longer than either side.

Can perimeter mode return a square?

Yes. If the solved length equals the supplied width, the rectangle is a square.

What are the extra outputs for?

They confirm the solved length by showing the area, perimeter, and diagonal implied by the final dimensions.

Can I use decimal values?

Yes. All three modes accept positive decimal measurements and round the outputs to six decimal places.