Skip to main content

Perimeter Calculator

Calculate perimeter of rectangles, squares, triangles, and regular polygons.

Written by Golam Rabbani, Founder & Lead Engineer

How to use this perimeter calculator

  1. Select a shape — Rectangle, Square, Triangle, Circle, or Polygon.
  2. Enter the required measurements for that shape (e.g. Length and Width for a rectangle).
  3. Press Calculate to see the perimeter or circumference.
  4. Use Copy to put the result on your clipboard, or Reset to start over.

About this perimeter calculator

The perimeter calculator finds the total boundary length of five common shapes — rectangle, square, triangle, circle, and regular polygon — using the standard formula for each.

Each shape uses a different formula. Rectangle: P = 2 × (length + width). Square: P = 4 × side. Triangle: P = side a + side b + side c. Regular polygon: P = number of sides × side length. For a circle the result is the circumference, computed as C = 2π × radius, where π is taken as the full floating-point value of Math.PI, so the answer is accurate to six decimal places. Switching between shapes clears the current inputs so previous values never carry over to an unrelated shape.

For example, a rectangle with a length of 12 and a width of 5 gives P = 2 × (12 + 5) = 34 units. A circle with a radius of 7 gives C = 2 × 3.141593 × 7 ≈ 43.982297. This tool is useful for students working through geometry homework, DIY projects where you need to know how much fencing, trim, or edging to buy, and anyone who needs a quick boundary measurement without reaching for pen and paper.

FAQ

What does a perimeter calculator do?
A perimeter calculator computes the total length of the outer boundary of a 2-D shape. Enter the side lengths or radius and the tool returns the perimeter (or circumference for a circle) in the same unit you used for the inputs.
What formulas does the perimeter calculator use?
Rectangle: 2 × (length + width). Square: 4 × side. Triangle: side a + side b + side c. Regular polygon: number of sides × side length. Circle: 2π × radius. Each formula is applied directly with no rounding until the final result, which is displayed to six decimal places.
Can I use any unit of measurement?
Yes. The tool works with any consistent unit — centimetres, metres, inches, feet, or anything else. Just make sure all inputs are in the same unit; the result will be in that same unit.
What happens if I enter a zero or negative value?
The tool validates every input before calculating. Any side length, radius, or number of sides that is zero, negative, or not a number triggers an error message, and no result is shown until all values are valid.
Does the tool store the measurements I enter?
No. The perimeter calculator runs entirely in your browser. Nothing is sent to a server or saved between sessions — closing or refreshing the page clears all inputs.
Is the perimeter calculator free?
Yes, it is free to use with no signup, no account, and no usage limit.