Most flat-shape questions need more than the area: the perimeter, a diagonal or an angle comes up as well. This 2D shape calculator returns those properties together for a square, rectangle, triangle, circle, ellipse, parallelogram, trapezoid, rhombus or regular polygon. Pick the shape, enter its measurements and read area, perimeter and the shape’s other values in one go.
2D Shape Calculator
All the main properties of 2D shapes — area, perimeter, diagonals and angles — for squares, rectangles, triangles, circles, ellipses, parallelograms, trapezoids, rhombuses and regular polygons.
The starting shape is a square with a 5 cm side. It has an area of 25 cm², a perimeter of 20 cm and a diagonal of 7.07 cm.
How are the properties of a 2D shape calculated?
Each shape has its own formula set, and the calculator applies the one you select. The table shows the main results.
| Shape | Area | Other results |
|---|---|---|
| Square | a² | P = 4a, diagonal a√2 |
| Rectangle | l × w | P = 2(l + w), diagonal √(l² + w²) |
| Triangle | Heron’s formula | P = a + b + c, three angles |
| Circle | π × r² | C = 2πr, d = 2r |
| Ellipse | π × a × b | perimeter by Ramanujan |
| Parallelogram | a × b × sin θ | height, two diagonals |
| Trapezoid | ½ × (a + b) × h | perimeter, midline |
| Rhombus | a² × sin θ | P = 4a, two diagonals |
| Regular polygon | n × s² ÷ (4 × tan(π ÷ n)) | apothem, circumradius, interior angle |
Worked example: the starting values
Square side 5 cm
Area = 5 × 5 = 25 cm²
Perimeter = 4 × 5 = 20 cm
Diagonal = 5 × √2 = 7.07 cm
For a rectangle of 8 × 6 cm the area is 48 cm², the perimeter is 28 cm and the diagonal is √(64 + 36) = 10 cm.
Worked examples for different shapes
Worked examples
A triangle from three sides
Enter 5, 6 and 7 cm. Then s = 9 and the area is √(9 × 4 × 3 × 2) = √216 = 14.70 cm². The angles come from the law of cosines and are 44.42°, 57.12° and 78.46°, which add to 180°.
A trapezoid
With bases of 10 and 6 cm and a height of 4 cm, the area is ½ × 16 × 4 = 32 cm². The legs of 4.47214 cm, which is √20, give a perimeter of 10 + 6 + 2 × 4.47 = 24.94 cm. The area does not depend on the legs, which the calculator only uses for the perimeter and to check each is at least the height.
A regular hexagon
For six sides of 4 cm, the area is 6 × 16 ÷ (4 × tan 30°) = 41.57 cm² and the perimeter is 24 cm. The apothem is 3.46 cm, the circumradius is 4 cm and each interior angle is 120°.
What the calculator leaves out
Each shape is a single, simple figure, so composite or irregular outlines need splitting into parts. The parallelogram and rhombus need an angle in degrees, and the angle must be less than 180°. The trapezoid cannot tell whether your legs and height agree, so enter consistent values. All lengths must share one unit, and the area is in that unit squared.
How do the results scale with size?
When every length of a shape is doubled, the perimeter doubles and the area is multiplied by four. The starting 5 cm square has an area of 25 cm² and a perimeter of 20 cm, while a 10 cm square has an area of 100 cm² and a perimeter of 40 cm. The diagonal of the square grows from 7.07 cm to 14.14 cm, in step with the side.
Checking a result by hand
A quick check catches most entry mistakes. A circle of radius 5 cm has a diameter of 10 cm, an area of 78.54 cm² and a circumference of 31.42 cm, so the circumference is a little over three times the diameter. For a rectangle, the diagonal must be longer than either side, and for a triangle the three angles must add to 180°.
Frequently asked questions
What does a 2D shape calculator do?
It finds the area, perimeter and other properties of a flat shape. The starting 5 cm square gives 25 cm², 20 cm and a 7.07 cm diagonal.
How do I find the area of a triangle from three sides?
Use Heron’s formula. For 5, 6 and 7 cm, s = 9 and the area is √216 = 14.70 cm².
How do I find the area of a regular polygon?
Use n × s² ÷ (4 × tan(π ÷ n)). A hexagon with 4 cm sides is 41.57 cm².
How do I find the diagonals of a parallelogram?
With sides a and b and angle θ, they are √(a² + b² + 2ab cos θ) and √(a² + b² − 2ab cos θ). For 8, 5 and 60° they are 11.36 and 7.
Why does the calculator say my triangle is not valid?
Each side must be shorter than the sum of the other two. Sides of 1, 2 and 5 fail that test.




