This calculator finds the perimeter and area of five common two-dimensional shapes: square, rectangle, triangle, circle and regular polygon. The perimeter of a shape is the total length of its outer boundary: add up all the side lengths for polygons, or use the formula 2 pi r for a circle (where the perimeter is called the circumference). Area is the amount of flat space enclosed inside the boundary. For a square with side s, perimeter is 4s and area is s squared. For a rectangle with length l and width w, perimeter is 2 times (l plus w) and area is l times w. For a triangle where you know all three sides a, b and c, perimeter is a plus b plus c and area uses Heron's formula: first compute the semi-perimeter s equal to half the sum of all three sides, then area equals the square root of s times (s minus a) times (s minus b) times (s minus c). For a circle with radius r, circumference is 2 pi r and area is pi r squared. For a regular polygon with n sides each of length s, perimeter is n times s and area is (n times s squared) divided by (4 times tan(pi divided by n)). You select the shape, enter the required dimensions, and the results appear instantly. The tool is useful for students at all levels of school geometry, tradespeople estimating materials such as fencing or carpet, and designers working out boundary lengths and surface areas. All inputs must be positive; triangle sides must satisfy the triangle inequality (no single side longer than the sum of the other two).
20.00
perimeter
Area24.00
ShapeRectangle
How it works
Square: P = 4s; A = s². Rectangle: P = 2(l + w); A = l × w. Triangle: P = a + b + c; area via Heron's formula: s = P/2, A = sqrt(s(s−a)(s−b)(s−c)). The triangle must satisfy the triangle inequality. Circle: P (circumference) = 2πr; A = πr². Regular polygon: P = n × s; A = (n × s²) / (4 × tan(π/n)). All inputs must be positive. For the regular polygon the number of sides must be 3 or more.
Worked example
Select Rectangle, enter length = 6 and width = 4. Perimeter = 2 × (6 + 4) = 20. Area = 6 × 4 = 24. These match the default values pre-filled in the calculator above. To verify with a square: set side = 5, perimeter = 20, area = 25. For a circle of radius 5: circumference = 2 × π × 5 = 31.42, area = π × 25 = 78.54.