2D Geometry Calculator
2D Area & Perimeter Calculator
Calculate area, perimeter, circumference and missing dimensions for squares, rectangles, triangles, circles, parallelograms, trapezoids, ellipses and regular polygons. Select a shape and calculation mode to display only the measurements required.
Formula & Methodology
How Area, Perimeter and Missing Dimensions Are Calculated
The calculator identifies the selected plane shape, validates the required measurements, normalizes linear dimensions to a common internal unit, applies the appropriate geometry equation, and then converts the result to the requested display unit. Inverse formulas are used only where the supplied measurements determine one unique missing dimension.
Select the shape and calculation objective.
Check dimensions and geometric constraints.
Convert linear inputs to common internal units.
Apply the selected direct or inverse formula.
Reject impossible or non-finite geometry.
Convert and round only the displayed result.
Area and perimeter formulas by shape
These are the governing equations used for the calculator’s direct area, perimeter and circumference calculations.
| Shape | Area | Perimeter / circumference | Required dimensions |
|---|---|---|---|
| Square | A = s² |
P = 4 × s |
Side length s |
| Rectangle | A = L × W |
P = 2 × (L + W) |
Length L, width W |
| Triangle | A = (b × h) ÷ 2 |
P = a + b + c |
Base and perpendicular height, or three sides |
| Circle | A = π × r² |
C = 2 × π × r = π × d |
Radius r or diameter d |
| Parallelogram | A = b × h |
P = 2 × (b + s) |
Base, perpendicular height and/or adjacent side |
| Trapezoid | A = ((b₁ + b₂) × h) ÷ 2 |
P = b₁ + b₂ + s₁ + s₂ |
Parallel bases, height or all four sides |
| Ellipse | A = π × a × b |
P ≈ π(a+b)[1 + 3h ÷ (10 + √(4−3h))]
|
Semi-major radius a, semi-minor radius b |
| Regular polygon | A = (P × a) ÷ 2 |
P = n × s |
Number of sides n, side s, apothem a |
For an ellipse, a and b are semi-axis lengths. When the calculator accepts full major and minor axes, each full axis is divided by 2 before applying the formula.
Missing-dimension formulas
A missing value is calculated by algebraically rearranging the corresponding direct geometry equation.
| Known information | Solve for | Inverse equation |
|---|---|---|
| Square area A | Side | s = √A |
| Square perimeter P | Side | s = P ÷ 4 |
| Rectangle area A and length L | Width | W = A ÷ L |
| Rectangle perimeter P and length L | Width | W = (P ÷ 2) − L |
| Triangle area A and base b | Height | h = (2 × A) ÷ b |
| Triangle area A and height h | Base | b = (2 × A) ÷ h |
| Triangle perimeter P and sides a, b | Third side | c = P − a − b |
| Circle area A | Radius | r = √(A ÷ π) |
| Circle circumference C | Radius | r = C ÷ (2 × π) |
| Circle circumference C | Diameter | d = C ÷ π |
| Parallelogram area A and base b | Height | h = A ÷ b |
| Trapezoid area A and bases b₁, b₂ | Height | h = (2 × A) ÷ (b₁ + b₂) |
| Ellipse area A and full major axis D₁ | Full minor axis D₂ | D₂ = 4A ÷ (π × D₁) |
| Regular polygon perimeter P and side count n | Side length | s = P ÷ n |
| Regular polygon area A and perimeter P | Apothem | a = (2 × A) ÷ P |
How units are applied to the result
Dimensionality is preserved throughout normalization, calculation and output conversion.
| Quantity | Dimension | Example | Conversion rule |
|---|---|---|---|
| Length / width / side / radius | Linear | 12 ft | xout = xm ÷ fout |
| Perimeter / circumference | Linear | 40 ft | Pout = Pm ÷ fout |
| Area | Square | 96 ft² | Aout = Am² ÷ fout² |
fout is the number of meters represented by one unit of the selected output measurement. Square units must never be converted with only the linear factor.
Ellipse perimeter approximation
Ellipse area is exact for the entered axes, but the perimeter calculation requires an approximation.
h = (a − b)² ÷ (a + b)²
P ≈ π × (a + b) × [1 + (3 × h) ÷ (10 + √(4 − 3 × h))]
Here a and b are the ellipse’s semi-axis lengths. This distinction matters because the calculator’s user-facing major and minor axis inputs represent full axis lengths.
Example: area and perimeter of a 12 ft × 8 ft rectangle
L = 12 ft
W = 8 ft
Both measurements are numeric, finite and greater than zero.
12 × 0.3048 = 3.6576 m
8 × 0.3048 = 2.4384 m
A = L × W
A = 12 × 8 = 96 ft²
P = 2 × (12 + 8) = 40 ft
s = P ÷ 2 = 40 ÷ 2 = 20 ft
Area = 96 ft²
Perimeter = 40 ft
Triangle calculations when all three sides are known
Three sides determine the perimeter directly and also allow area to be calculated with Heron’s formula.
s = (a + b + c) ÷ 2
A = √[s × (s − a) × (s − b) × (s − c)]
Before Heron’s formula is evaluated, the side lengths must pass the triangle inequality: the sum of any two sides must be greater than the remaining side.
Validation and solvability checks
A formula is evaluated only when the supplied dimensions define a mathematically valid and sufficiently constrained problem.
Precision, rounding and result presentation
| Stage | Method |
|---|---|
| Input | Preserve the numeric measurement supplied by the user. |
| Normalization | Convert using the full defined unit conversion factor. |
| Geometry | Perform calculations using full available floating-point precision. |
| π | Use the runtime’s full π value rather than replacing it with 3.14. |
| Intermediate values | Do not round before later calculations are complete. |
| Display | Round or format only the user-facing result. |
Method: selected shape → known dimensions → normalize units → select equation → substitute → calculate → apply linear or square output units.
↑ Return to 2D Area & Perimeter CalculatorWorked Example & Analysis
Applying Area and Perimeter Calculations
A geometry result often becomes an input to a second practical calculation. This example shows the mathematics for a rectangular floor, compares several room sizes, and then applies an adjustable material-overage factor without changing the underlying geometric area.
Worked case: rectangular room floor
A homeowner, contractor or estimator needs the floor area for material planning and the boundary length for perimeter-related work.
Known values
The room is modeled as a rectangle. Its measured length is 12 ft and its measured width is 8 ft.
- Shape
- Rectangle
- Length
- 12 ft
- Width
- 8 ft
- Area formula
- A = L × W
- Perimeter formula
- P = 2 × (L + W)
Calculation
| Metric | Formula | Substitution | Result |
|---|---|---|---|
| Area | A = L × W |
12 × 8 |
96 ft² |
| Perimeter | P = 2 × (L + W) |
2 × (12 + 8) |
40 ft |
| Semiperimeter | s = P ÷ 2 |
40 ÷ 2 |
20 ft |
| Area in square yards | Ayd² = Aft² ÷ 9 |
96 ÷ 9 |
10.666667 yd² |
The rectangular floor encloses exactly 96 ft² under the stated 12 ft by 8 ft model, while its four-edge boundary totals 40 ft.
A material estimate based on area should start from 96 ft², while a perimeter-based material estimate should start from 40 linear ft. Openings, cuts and installation waste are separate considerations.
Scenario comparison: changing rectangle dimensions
Area and perimeter do not change at the same rate. These examples use the same rectangle equations with different dimensions.
| Scenario | Dimensions | Area | Perimeter | Difference from 12 × 8 area |
|---|---|---|---|---|
| Smaller | 10 ft × 8 ft | 80 ft² | 36 ft | −16 ft² |
| Base case | 12 ft × 8 ft | 96 ft² | 40 ft | — |
| Longer | 14 ft × 8 ft | 112 ft² | 44 ft | +16 ft² |
| Larger both ways | 14 ft × 10 ft | 140 ft² | 48 ft | +44 ft² |
Area & Material Overage Analyzer
Start with a known geometric area and apply a planning overage percentage for cuts, breakage, pattern matching or other project-specific allowance. This tool does not recalculate the shape; it analyzes the practical quantity derived from the area.
Transparent calculation breakdown
Geometry Reference
Understanding 2D Area, Perimeter and Shape Measurements
Area describes the amount of two-dimensional space enclosed by a shape, while perimeter describes the total length around its boundary. Correct results depend on choosing the appropriate shape model, measuring the required dimensions consistently, and keeping linear and square units distinct.
A result such as 96 ft² means the modeled shape encloses 96 square feet. Area is expressed in square units because it measures two-dimensional extent.
A perimeter of 40 ft means the complete boundary has a total linear length of 40 feet. Perimeter is therefore expressed in linear rather than square units.
A missing length is obtained by rearranging a known shape equation. It is valid only when the supplied measurements provide enough information to determine that dimension uniquely.
Quick 2D shape reference
Use the shape that best represents the measured boundary rather than selecting a formula only because convenient measurements are available.
| Shape | Defining feature | Typical area inputs | Typical boundary inputs | Area formula |
|---|---|---|---|---|
| Square | Four equal sides and four right angles | One side | One side | A = s² |
| Rectangle | Opposite sides equal; four right angles | Length and width | Length and width | A = L × W |
| Triangle | Three straight sides | Base + perpendicular height, or three sides | Three sides | A = (b × h) ÷ 2 |
| Circle | All boundary points equidistant from center | Radius or diameter | Radius or diameter | A = π × r² |
| Parallelogram | Two pairs of parallel opposite sides | Base + perpendicular height | Two adjacent side lengths | A = b × h |
| Trapezoid | One pair of parallel opposite sides | Both parallel bases + height | All four sides | A = ((b₁ + b₂) × h) ÷ 2 |
| Ellipse | Oval defined by major and minor axes | Major + minor axes | Major + minor axes | A = π × a × b |
| Regular polygon | All sides and interior angles equal | Side count, side and/or apothem | Side count + side length | A = (P × a) ÷ 2 |
Key geometry terms
- Area
- The two-dimensional space enclosed by a boundary, expressed in square units such as in², ft², yd², cm² or m².
- Perimeter
- The total linear distance around a closed plane shape.
- Circumference
- The perimeter of a circle. For radius r, C = 2 × π × r.
- Semiperimeter
- One-half of a shape’s perimeter. It is especially useful in triangle calculations such as Heron’s formula.
- Radius
- The distance from the center of a circle to its boundary. Radius equals one-half of diameter.
- Diameter
- A straight line through a circle’s center joining two boundary points. Diameter equals 2 × radius.
- Height
- The perpendicular distance from a selected base to the opposite vertex or parallel side. It is not necessarily the same as a sloping side length.
- Apothem
- For a regular polygon, the perpendicular distance from its center to the midpoint of a side.
- Major and minor axes
- The longest and shortest full diameters of an ellipse. Their corresponding semi-axis lengths are one-half of those full measurements.
Calculator assumptions
These assumptions define what the geometric result represents.
Each selected shape is treated as an ideal mathematical 2D shape with straight edges or mathematically defined curves.
Measurements are normalized to compatible units before the shape equation is evaluated.
Triangle, parallelogram and trapezoid area formulas use perpendicular height rather than an angled edge.
The regular-polygon formulas assume every side has equal length and every interior angle is equal.
User-facing major and minor axis measurements are full axes. The geometry equation converts them to semi-axis lengths before calculation.
Circle and ellipse calculations use the runtime’s available value of π rather than a shortened 3.14 approximation.
Limitations
The calculator models geometric quantities, not every real-world property of the object being measured.
A room, lot or component with recesses, projections, curves or unequal sides may not be accurately represented by one standard shape.
A mathematically precise result cannot be more physically accurate than the measurements supplied to the calculator.
Geometric area does not automatically include cutting waste, breakage, overlap, seams, pattern matching or installation allowance.
A 2D area calculation does not account for material thickness. Volume requires a separate third dimension.
Curved Earth effects, coordinate geometry, bearings, property boundaries and surveying corrections are outside the scope of a basic plane-shape calculator.
Unlike circle circumference, a general ellipse does not use a simple elementary closed-form perimeter equation. The calculator therefore uses the documented Ramanujan approximation.
Area and perimeter answer different questions
| Example task | Usually use | Unit type |
|---|---|---|
| Floor surface | Area | ft², yd², m² |
| Painted flat panel face | Area | in², ft², m² |
| Fence around a rectangular plot | Perimeter | ft, yd, m |
| Trim around a rectangular opening | Perimeter | in, ft, cm, m |
| Distance around a circular feature | Circumference | in, ft, cm, m |
| Surface inside a circular boundary | Area | in², ft², cm², m² |
Common area and perimeter calculation errors
Most incorrect results come from selecting the wrong measurement, mixing units or applying the right equation to the wrong geometry.
Area uses square units and measures enclosed surface. Perimeter uses linear units and measures the boundary.
Triangle, parallelogram and trapezoid area equations require perpendicular height unless another valid area method is used.
Measurements such as 10 ft and 6 in must first be expressed in compatible units before multiplication or addition.
Since 1 yd = 3 ft, it does not follow that 1 yd² = 3 ft². Squaring the conversion gives 1 yd² = 9 ft².
Diameter is twice the radius. Substituting diameter directly for r in A = π × r² makes the calculated circle area four times too large.
In A = π × a × b, a and b are semi-axis lengths. Full major and minor axes must each be divided by 2 first.
Three positive lengths do not automatically form a triangle. Each pair of sides must sum to more than the remaining side.
Repeated rounding can accumulate error. Preserve full precision internally and round the final displayed result.
Practical measurement workflow
A reliable geometry calculation starts with the physical measurement process, not with the formula.
Decide exactly which surface or edge the calculation should represent.
Determine whether one standard shape is adequate or whether the object should be divided into simpler regions.
Measure the dimensions required by that shape’s formula, including perpendicular heights where applicable.
Keep the measurement unit attached to every recorded value before entering it into the calculator.
How scaling changes area and perimeter
A linear change in every dimension produces a different proportional change in area.
| Linear scale factor k | Each length becomes | Perimeter becomes | Area becomes |
|---|---|---|---|
| 0.5 | 0.5 × original | 0.5 × original | 0.25 × original |
| 1 | 1 × original | 1 × original | 1 × original |
| 2 | 2 × original | 2 × original | 4 × original |
| 3 | 3 × original | 3 × original | 9 × original |
Area and perimeter questions
Can two shapes have the same area but different perimeters?
Yes. Area measures enclosed space rather than boundary length. For example, a 12 ft × 8 ft rectangle has area 96 ft² and perimeter 40 ft, while a 16 ft × 6 ft rectangle also has area 96 ft² but perimeter 44 ft.
Can two shapes have the same perimeter but different areas?
Yes. A 12 ft × 8 ft rectangle has perimeter 40 ft and area 96 ft². A 15 ft × 5 ft rectangle also has perimeter 40 ft but its area is only 75 ft².
Why is area measured in square units?
Area represents two-dimensional extent. Multiplying one linear dimension by another produces a squared unit, such as ft × ft = ft² or m × m = m².
Is circumference different from perimeter?
Circumference is the conventional term for the perimeter of a circle. Both describe boundary length and therefore use linear units.
Why can’t every missing dimension be solved?
A unique answer requires enough independent known information. For example, many different rectangles can have the same area, so knowing area alone cannot determine both length and width.
Should material waste be added to the geometric area?
Keep the two quantities conceptually separate. First calculate the actual geometric area. Then apply any project-specific allowance as a separate planning calculation so the underlying geometry remains visible.