Geometry Calculator

Pick a shape, type its dimensions in any of eight length units (mm / cm / m / km / in / ft / yd / mi), and read off the area, perimeter, surface area, and volume in real time. Diagonals, slant heights, and great-circle circumference are surfaced where they apply. All math in your browser, no upload.

Shape
mm Length of any side

How is each measurement computed?

All formulas below treat the user input as a length in the chosen unit. Square and cubic readouts are scaled to the square / cube of that unit (e.g. cm → cm² and cm³).

Square (side s)

  • Area = s²
  • Perimeter = 4s
  • Diagonal = s√2

Rectangle (width w, height h)

  • Area = w × h
  • Perimeter = 2(w + h)
  • Diagonal = √(w² + h²)

Circle (radius r)

  • Area = π r²
  • Circumference = 2π r

Triangle (sides a, b, c)

  • Perimeter = a + b + c
  • Area = √(s(s−a)(s−b)(s−c)) — Heron
  • where s = (a + b + c) / 2

Cube (side s)

  • Surface area = 6 s²
  • Volume = s³
  • Space diagonal = s√3

Cuboid (w × h × d)

  • Surface area = 2(wh + wd + hd)
  • Volume = w × h × d
  • Space diagonal = √(w² + h² + d²)

Sphere (radius r)

  • Surface area = 4π r²
  • Volume = (4/3) π r³
  • Great-circle = 2π r

Cylinder (radius r, height h)

  • Surface area = 2π r (r + h)
  • Volume = π r² h
  • (h = 0 collapses to a flat disc.)

Cone (radius r, height h)

  • Slant height = √(r² + h²)
  • Surface area = π r (r + slant)
  • Volume = (1/3) π r² h
Unit conversion notes

The page handles eight length units — four metric (mm, cm, m, km) and four imperial (in, ft, yd, mi). Internally every shape is computed in metres; the readouts are scaled to the unit you pick. Exact by international convention:

  • 1 in = 0.0254 m — international yard and pound, 1959
  • 1 ft = 0.3048 m  ·  1 yd = 0.9144 m  ·  1 mi = 1609.344 m

Square and cubic readouts inherit the unit: a 10 cm cube has a volume of 1000 cm³ (1 litre) in cm-mode, but 0.001 m³ in m-mode. Both are the same cube.