Geometry Calculator
Calculate area, perimeter, volume of 2D and 3D shapes. Circle, triangle, rectangle, sphere, cube formulas. Free online geometry calculator with diagrams
Geometry calculation by formula is fast for triangles and circles; for less common shapes (Heron's formula for triangle area from sides, spherical cap volume, regular polygon apothems), the formulas are easy to forget and easy to derive incorrectly. This calculator covers 30+ 2D and 3D shapes, shows the formula it used so you can verify, and handles unit consistency (you input mm, mm² comes out for areas without manual conversion).
Shapes and what calculations each supports
- 2D — circle (area, circumference), triangle (Heron, 30-60-90, equilateral, right), square, rectangle, parallelogram, trapezoid, rhombus, regular polygon (n-gon), ellipse, annulus (ring), circular sector, circular segment.
- 3D — cube, rectangular prism (box), sphere, hemisphere, cylinder (right circular, oblique), cone, frustum (truncated cone), pyramid (square base, triangular base), tetrahedron, octahedron, ellipsoid, torus, spherical cap.
- Each shape supports: area (2D) or surface area + volume (3D), perimeter / circumference, and shape-specific properties (diagonals, apothems, inradius/circumradius for polygons).
- Specialty calculations — distance between two points (2D, 3D), distance between two 3D lines (skew lines), area of irregular polygon by vertex coordinates (Shoelace formula).
Working example: a Pythagorean triangle
Input
A right triangle with legs 3 m and 4 m. Find hypotenuse, area, perimeter, angles.
Output
Hypotenuse: c = √(3² + 4²) = √25 = 5 m Area: (1/2) × 3 × 4 = 6 m² Perimeter: 3 + 4 + 5 = 12 m Angles: Right angle: 90° Adjacent to 3: arctan(4/3) ≈ 53.13° Adjacent to 4: arctan(3/4) ≈ 36.87° Sum: 180° ✓ Inscribed circle radius: r = area / s = 6 / 6 = 1 m (s = semi-perimeter = 6) Circumscribed circle radius: R = c / 2 = 2.5 m (right triangle: R = hypotenuse / 2) This is the famous 3-4-5 right triangle — the smallest integer Pythagorean triple. Used by builders for centuries to lay out right angles without a square.
Pythagorean triples: integer (a, b, c) where a² + b² = c². Primitives include (3,4,5), (5,12,13), (8,15,17), (7,24,25). All other right triangles with rational sides are multiples of primitives.
Formulas that surprise
- Triangle area from three sides (no height) — Heron's formula: s = (a+b+c)/2; area = √(s(s-a)(s-b)(s-c)). Numerically unstable for very thin triangles; use the Kahan-stable variant for those.
- Regular polygon area — (1/2) × perimeter × apothem. Apothem = R cos(π/n) where R is circumradius.
- Sphere volume — (4/3)π r³. Sphere surface area — 4π r². The "4" relates them: V = (1/3) × r × A.
- Cone volume — (1/3) × base area × height. The "1/3" appears in pyramids too — every 3D "pointed" shape has volume = (1/3) × base × height.
- Torus surface area — 4π² R r where R = distance from center of torus to center of tube, r = tube radius. Volume — 2π² R r².
- Distance between two 3D points — √((x₁-x₂)² + (y₁-y₂)² + (z₁-z₂)²). Generalizes 2D Pythagoras.
When to reach for this tool
- You are working on a DIY project (deck, fence, garden bed) and need accurate area / perimeter / volume calculations.
- You are doing homework or studying for a test and want to verify a manual calculation.
- You are estimating materials (paint for a wall, concrete for a foundation, soil for a garden bed) from dimensions.
- You are designing UI or a layout and need to compute distances, angles, or proportions.
What this tool will not do
- It will not do symbolic geometry. For "is angle ABC = angle BCD given...", use a symbolic geometry tool (Geogebra, Wolfram Alpha).
- It will not handle non-Euclidean geometry (spherical, hyperbolic). Specific tools exist; this calculator assumes flat Euclidean.
- It will not compute surface integrals on arbitrary surfaces. For complex shapes (machined parts, organic surfaces), use CAD software.
- It will not give engineering tolerances or material strengths — geometry input only; structural / material engineering is separate.
Frequently asked questions
Why does my calculator show area in mm² when I entered mm?
Area is length × length, so the unit is length². For consistent results: input dimensions in your preferred unit (m, cm, mm, ft, in), and area/perimeter outputs in the same unit (area squared, volume cubed). Mixing units (some inputs in m, some in cm) causes silent errors; verify all dimensions use the same unit.
How is the area of an irregular polygon computed?
Shoelace formula (also called surveyor's formula). Given vertices (x₁,y₁), (x₂,y₂), ..., (xₙ,yₙ): area = |Σ (xᵢ × y_{i+1} - x_{i+1} × yᵢ)| / 2. Works for any simple (non-self-intersecting) polygon. For polygons with holes or self-intersection, more complex methods needed.
What is "apothem"?
In a regular polygon, the perpendicular distance from the center to the midpoint of any side. Equal to R cos(π/n) where R is the circumradius. Used in area formula: A = (1/2) × perimeter × apothem.
How accurate are the answers?
Limited by floating-point precision. For typical inputs (a few significant digits), output to 4-6 decimal places is reliable. For extreme cases (very thin triangles, very large numbers), numerical instability can affect the last few digits. For engineering-critical work, verify against a CAS or do the math symbolically.
Can I compute area of a circle without knowing the radius?
If you know the diameter, circumference, or another property, yes. Diameter d → A = π(d/2)². Circumference c → A = c²/(4π). The calculator handles these conversions automatically — just specify which property you know.
Is π exact in the calculator?
Computed to JavaScript's double-precision (~15-17 significant digits). For higher precision, use arbitrary-precision math libraries (Decimal.js, BigInt-based) — overkill for everyday geometry.
Related tools
Solve linear, quadratic, cubic equations and systems of equations online. Step-by-step solutions with graphing. Free math equation solver calculator
Perform matrix operations: addition, multiplication, inverse, determinant, transpose, eigenvalues. Free online linear algebra matrix calculator
Plot mathematical functions and equations. Create line, scatter, parametric graphs. Free online graphing calculator and function visualizer
Free online unit converter. Convert length (meters, feet, inches), weight (kg, lbs), temperature (Celsius, Fahrenheit), volume, area, speed and more units instantly
Last updated · E-Utils editorial team