2D Shapes Calculator
Results
Formulas Used in 2D Shapes Calculator
In-Depth Tutorial: 2D Shapes Calculator
The 2D Shapes Calculator handles the six most common two-dimensional figures — square, rectangle, triangle, circle, parallelogram, and trapezoid — in a single tool. Pick the shape, enter the required dimensions, and the calculator returns both area and perimeter. This tutorial covers what dimensions each shape needs, the formulas behind the calculations, and how to choose between specialized calculators when you need more depth.
The six shapes at a glance
| Shape | Inputs needed | Area formula | Perimeter formula |
|---|---|---|---|
| Square | side length s | s² | 4s |
| Rectangle | length l, width w | l × w | 2(l + w) |
| Triangle | base b, height h | ½ × b × h | varies (need all 3 sides) |
| Circle | radius r | πr² | 2πr (circumference) |
| Parallelogram | base b, height h | b × h | varies (need both side lengths) |
| Trapezoid | two bases b₁, b₂, height h | ½(b₁ + b₂) × h | varies (need all 4 sides) |
Square — the simplest case
A square has four equal sides and four right angles. Its area and perimeter both depend on a single input: the side length s.
Area = s². Perimeter = 4s.
Example: a square with s = 6 cm has area 36 cm² and perimeter 24 cm.
Rectangle
A rectangle has two pairs of parallel sides with opposite sides equal. Four right angles.
Area = length × width = l × w. Perimeter = 2(l + w).
Example: a rectangle 8 m × 5 m has area 40 m² and perimeter 26 m.
Triangle
The triangle formula A = ½ × base × height applies to any triangle, not just right ones. The height is the perpendicular distance from the chosen base to the opposite vertex.
If you have all three sides but no height, use Heron's formula instead: A = √(s(s−a)(s−b)(s−c)) where s = (a+b+c)/2.
For the full triangle solver (any inputs, any case), use the Triangle Solver.
Example: a triangle with base 10 cm and height 6 cm has area 30 cm². Perimeter depends on the other two sides.
Circle
A circle is fully determined by its radius (distance from center to edge).
Area = πr². Perimeter (called "circumference") = 2πr.
Note the irrational number π ≈ 3.14159. The full π discussion is worth a read.
For more circle subtopics (sector area, arc length, chord length), use the Circle Geometry Calculator.
Example: a circle with r = 4 cm has area 16π ≈ 50.27 cm² and circumference 8π ≈ 25.13 cm.
Parallelogram
A parallelogram has two pairs of parallel sides but its angles are generally not 90° (a parallelogram with right angles IS a rectangle — a special case).
Area = base × height. The height is the perpendicular distance between the two chosen parallel sides, NOT the length of the slanted side.
Perimeter = 2(base + side length). Note: the "side length" is the slanted side, not the height.
Example: a parallelogram with base 8 and height 5 (and slant side 6) has area 40 and perimeter 28.
For more parallelogram-specific tools (angles, diagonals, height from sides), see the Parallelogram Angle Solver and related parallelogram calculators.
Trapezoid
A trapezoid has at least one pair of parallel sides. Its area formula averages the two parallel sides and multiplies by the perpendicular height.
Area = ½ × (b₁ + b₂) × h. Perimeter = sum of all four sides.
For the full derivation and worked examples, see the trapezoid area tutorial.
Example: a trapezoid with parallel sides 6 and 10, and height 4, has area ½ × 16 × 4 = 32.
Choosing between this calculator and specialized ones
The 2D Shapes Calculator is a quick general-purpose tool. For deeper analysis on any specific shape, our specialized calculators have more inputs and outputs:
- Triangle Solver — any triangle from any 3 known elements (SSS, SAS, ASA, AAS, SSA)
- Circle Geometry Calculator — radius, diameter, area, circumference interconnected; reverse-direction solving
- Quadrilateral Angle Calculator — all four angles given three
- Polygon Angle Sum — for any n-sided polygon
- Regular Polygon Calculator — areas and perimeters of n-sided regular polygons
What counts as a "2D shape"?
The six shapes in this calculator are the most common, but countless other 2D shapes exist:
- Regular polygons (pentagon, hexagon, octagon, etc.) — handled by the polygon calculators.
- Irregular polygons — area found by decomposing into triangles or using the Shoelace formula. See Area of Any Polygon.
- Ellipses — A = πab where a and b are the semi-major and semi-minor axes. Perimeter has no closed-form formula; an approximation is π(a + b)(1 + 3h/(10 + √(4−3h))) where h = ((a−b)/(a+b))².
- Sectors and circular segments — see the Circle Geometry Calculator and related circle tools.
- Composite figures — shapes built from multiple primitive shapes. Use the Composite Figure Calculator or AI Solve for irregular composites.
Worked example — comparing areas at fixed perimeter
You have 24 cm of fencing. What shape gives the maximum area?
- Square: perimeter 24 → side 6 → area 36 cm².
- Rectangle 8×4: same perimeter, area 32. Smaller.
- Rectangle 10×2: perimeter 24, area 20. Smaller still.
- Equilateral triangle with side 8: perimeter 24, area = (√3/4)(8)² = 16√3 ≈ 27.7 cm². Smaller.
- Circle with circumference 24: radius = 24/(2π) ≈ 3.82 → area = π(3.82)² ≈ 45.8 cm². Largest of all!
Among all 2D shapes with a given perimeter, the circle always encloses the maximum area. This is called the isoperimetric inequality and is a foundational result in geometry.
Common mistakes
- Using slant side as height in parallelogram or trapezoid. Height is the perpendicular distance between the parallel sides, NOT the slanted side. Only in a rectangle (or right trapezoid leg) are they the same.
- Using diameter as radius for the circle. Halve the diameter first.
- Confusing area and perimeter units. Area is in squared units (cm², m², etc.). Perimeter is in linear units (cm, m, etc.). A "perimeter of 100 cm²" doesn't make sense.
- Forgetting the ½ for triangle area. Area = ½ × base × height. Without the ½ you get the area of the bounding rectangle.
- Plugging diagonal of a rectangle as a side. The diagonal is √(l² + w²) by the Pythagorean theorem. It is not an input to the area formula.
Frequently Asked Questions – 2D Shapes Calculator
Square, rectangle, triangle, circle, parallelogram, and trapezoid. Select the shape first — the required dimension fields update accordingly.
It depends on the shape. For rectangle: length and width. For triangle: base and height. For parallelogram: base and height. For circle: enter radius in Dimension 1.
Yes — the calculator returns both area and perimeter for all supported shapes in a single result.
Yes — completely free and unlimited.