Geometry Shape Calculator
Calculate perimeter/area (2D) and surface area/volume (3D) with formulas and preview
2D Shapes
3D Shapes
Rectangle
A quadrilateral with four right angles; opposite sides are equal and parallel.
Parameters
cm
cm
How calculations work
- Decimal inputs are supported; all inputs must be positive numbers.
- This tool uses cm / cm² / cm³ by default (same as the source HTML).
- 2D shapes output perimeter (if supported) and area; 3D shapes output surface area and volume.
- Triangle area uses Heron's formula: s = (a+b+c)/2, S = √[s(s-a)(s-b)(s-c)]. Invalid sides (triangle inequality) will be rejected.
- For cones, slant height l = √(r² + h²) is used in surface area: S = πr(r + l).
- Displayed formulas are for understanding; numeric results are rounded for display (your inputs are kept as-is).
FAQ
Can inputs be 0 or negative?
No. All parameters must be positive numbers; invalid input will show an error.
Why does a triangle show “invalid”?
A valid triangle must satisfy the triangle inequality: the sum of any two sides must be greater than the third.
Why do results have small decimal errors?
Floating-point arithmetic has precision limits; results are rounded for display.