# What is the area of a shape?

Finds the area of a rectangle, square, triangle, circle, ellipse, trapezoid, parallelogram, circle sector, or regular polygon from its measurements.

- Page: https://www.acalculator.org/math/area-calculator
- JSON spec: https://www.acalculator.org/math/area-calculator.json
- Version: 686c7671252d

## Default answer

Example with the default inputs (Shape Rectangle, Length (l) 12, Width (w) 8): Rectangle area: 96 square units.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| shape | Shape | The flat shape to find the area of. |
| l | Length (l) | The length of the rectangle. |
| w | Width (w) | The width of the rectangle. |
| s | Side (s) | The length of each side. |
| b | Base (b) | The length of the base (for a trapezoid, one of the two parallel sides). |
| t | Top (t) | The other parallel side of the trapezoid. |
| h | Height (h) | The height, at right angles to the base. |
| sa | Side a | The first side of the triangle. |
| sb | Side b | The second side of the triangle. |
| sc | Side c | The third side of the triangle. |
| r | Radius (r) | The radius of the circle. |
| a | Semi-axis a | Half the length of the ellipse, along its longest or shortest axis. |
| b2 | Semi-axis b | Half the length of the ellipse along the other axis. |
| angle | Angle in degrees (θ) | The angle of the sector at the centre of the circle, in degrees, up to 360. |
| n | Number of sides (n) | How many equal sides the regular polygon has, from 3 to 1,000. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| area | Area | The space inside the shape, in the square of the length unit (cm gives cm²). |
| formula | Formula | The area formula for this shape. |

## Method

A = the shape’s standard area formula, for example A = l × w for a rectangle and A = πr² for a circle.

## Assumptions

- Every length is more than 0 and all are in the same unit; the area is in that unit squared.
- A height is measured at right angles to the base.
- Three sides must make a triangle: each side shorter than the other two together.
- A regular polygon has n equal sides and equal angles; a sector angle is more than 0 and at most 360°.

## Worked examples

1. shape = rectangle, l = 12, w = 8 gives area = 96, formula = A = l × w. Source: hand calculation in content.mdx: 12 × 8 = 96.
2. shape = square, s = 5 gives area = 25. Source: hand calculation in content.mdx: 5² = 25.
3. shape = triangle, b = 10, h = 4 gives area = 20. Source: hand calculation in content.mdx: 10 × 4 ÷ 2 = 20.
4. shape = triangle3, sa = 5, sb = 6, sc = 7 gives area = 14.696938. Source: hand calculation in content.mdx: p = 9, √(9 × 4 × 3 × 2) = √216 = 6√6; Python 3: math.sqrt(216) = 14.696938456699069.
5. shape = circle, r = 3 gives area = 28.274334. Source: hand calculation in content.mdx: π × 9; Python 3: math.pi * 9 = 28.274333882308138.
6. shape = ellipse, a = 5, b2 = 3 gives area = 47.12389. Source: hand calculation in content.mdx: π × 15; Python 3: math.pi * 15 = 47.12388980384689.
7. shape = trapezoid, b = 10, t = 6, h = 4 gives area = 32. Source: hand calculation in content.mdx: (10 + 6) × 4 ÷ 2 = 32.
8. shape = parallelogram, b = 10, h = 4 gives area = 40. Source: hand calculation in content.mdx: 10 × 4 = 40.
9. shape = sector, r = 3, angle = 60 gives area = 4.712389. Source: hand calculation in content.mdx: (π/3) × 9 ÷ 2 = 1.5π; Python 3: (math.pi / 3) * 9 / 2 = 4.71238898038469.
10. shape = polygon, n = 6, s = 5 gives area = 64.951905. Source: hand calculation in content.mdx: 6 × 25 ÷ (4 tan 30°) = 75√3 ÷ 2; Python 3: 6 * 25 / (4 * math.tan(math.pi / 6)) = 64.95190528383291.

## FAQ

### How do I calculate area?

Use the formula for the shape. For a rectangle, multiply the length by the width: a 12 × 8 room has an area of 96 square units. Break an irregular shape into rectangles and triangles, find the area of each, and add them.

### What units is the area in?

The square of the unit you measured in. Measure in feet and the area is in square feet (ft²); measure in meters and it is in square meters (m²). Use the same unit for every length. 1 m² is about 10.76 ft².

### How do I find the area of a triangle?

Multiply the base by the height and halve it: A = b × h ÷ 2, where the height is measured at right angles to the base. If you only know the three sides, use Heron's formula instead: with p half the perimeter, A = √(p(p − a)(p − b)(p − c)).

### How do I find the area of a circle?

Multiply π by the radius squared: A = πr². A circle with radius 3 has an area of 9π, about 28.27. If you know the diameter, halve it first; a circle with diameter 6 has the same area.

### How do I find the area of a trapezoid?

Add the two parallel sides, multiply by the height, and halve it: A = (b + t) × h ÷ 2. With parallel sides 10 and 6 and a height of 4, the area is 16 × 4 ÷ 2 = 32. It is the average width times the height.

### How do I find the area of a sector (a slice of a circle)?

Multiply the angle in radians by the radius squared and halve it: A = θr² ÷ 2. In degrees, the sector is θ ÷ 360 of the whole circle: a 60° slice of a circle with radius 3 has an area of 60 ÷ 360 × 9π = 1.5π, about 4.71.

## Sources

- OpenStax, Prealgebra 2e, section 9.4 Use Properties of Rectangles, Triangles, and Trapezoids: https://openstax.org/books/prealgebra-2e/pages/9-4-use-properties-of-rectangles-triangles-and-trapezoids
- OpenStax, Prealgebra 2e, section 9.5 Solve Geometry Applications: Circles and Irregular Figures: https://openstax.org/books/prealgebra-2e/pages/9-5-solve-geometry-applications-circles-and-irregular-figures
- OpenStax, Algebra and Trigonometry 2e, section 10.2 Non-right Triangles: Law of Cosines (Heron's formula): https://openstax.org/books/algebra-and-trigonometry-2e/pages/10-2-non-right-triangles-law-of-cosines
- OpenStax, Algebra and Trigonometry 2e, section 7.1 Angles (area of a sector): https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-1-angles
