HomeCalculatorsMathGeometryRectangle Calculator
Math calculator

Rectangle Calculator

Rectangle A = ab, P = 2(a+b), d = √(a²+b²). Same engine as Plane Geometry. Not Pythagorean-only. Not CAS. Runs locally.

Instant result
Result

Enter values to calculate.

Inputs
Mode
Formula
Trust summary Engine tested · Specification checked · 25/25 tests · Production surface contract 3/3 · v1.3.0
Input interpretation
Enter values to calculate.
Result
Model
Rectangle area, perimeter, and diagonal.
Scope
Euclidean plane
Verification
Engine tested · 25/25 tests · Production surface contract 3/3 · Specification checked · v1.3.0
Named expert review
Optional · Not performed
Specification basis
  • ISO 80000-2:2019 Quantities and units — Mathematics
Specification basis
Evidence
9 golden · 5 boundary · 11 property · Production surface contract 3/3 · Artifact integrity PASS
Production
Embedded snapshot: unpublished · Build schema 1.3.0 ready · Semantic contract ✓ · Attestation report not published on origin · Live production status STALE (2 capabilities; 162 remain CURRENT) @ 2026-09-20T09:01:12.147Z
Semantic contract
PASS

Formulas

Core equations used by this calculator.

AreaA = ab
Diagonald = √(a² + b²)
iSame engine as /plane-geometry. A square is mode=square on that hub. Not a second engine.

How to use

1

Enter a and b

Both must be positive. a = 3, b = 4 is the 3-4 rectangle.

2

Read A, P, and d

3×4 has area 12, perimeter 14, and diagonal 5.

Example calculations

Common configurations with formula and result.

ϟ

3-4 rectangle

a = 3, b = 4

d = √(9+16)
A=12, d=5
ϟ

Square as rectangle

a = 2, b = 2

A = 4
A=4, d=2√2

Rectangle calculator specification

Version 1.3.0 · Engine tested

Calculation status

Review policy · Evidence

Definition
A rectangle of sides a>0 and b>0 has area ab, perimeter 2(a+b), and diagonal √(a²+b²). a=b is a valid square on this engine. This page is mode=rectangle on math.geometry.plane. Not Pythagorean-only. Not CAS.
What it calculates
Rectangle area, perimeter, and diagonal.
Inputs
  • a
  • b
Outputs
  • area
  • perimeter
  • diagonal
Formula
A = ab, P = 2(a+b), d = √(a²+b²)
Assumptions
  • Euclidean plane
  • a = b is a valid square
  • Not Pythagorean-only
  • Not CAS
Units
  • length (consistent units)
  • area (length²)
Boundary conditions
  • a ≤ 0 or b ≤ 0 → VALUE_MUST_BE_POSITIVE
  • unknown mode → INVALID_MODE
Example
a=3 b=4 → A=12, d=5
Validation cases

2 published on this page · 25/25 tests · Production surface contract 3/3 · View evidence

  • a=3 b=4 → A=12 P=14 d=5
  • a=2 b=2 → A=4 square=true
Specification basis
  • ISO 80000-2:2019 Quantities and units — Mathematics
Calculation version
1.3.0
}

Frequently asked questions

Key distinctions behind the calculation.

Is this a second plane engine?

No. It is mode=rectangle on math.geometry.plane, the same engine as /calc/math/plane-geometry.

Is this the Pythagorean calculator?

No. The 3-4 diagonal is the same 5 as a 3-4-5 triangle, on a different model. Right triangles stay on /calc/math/pythagorean.

Where does this run?

Locally in the browser by default. REST and MCP call the same plane-geometry engine.