Perimeter Calculator

Choose a shape, enter its dimensions, select a unit, and calculate the perimeter with formula and steps.

Enter the rectangle's length and width using the same unit.

Enter at least three positive side lengths separated by commas or plus signs.

Result

No result yet

Formula: P = 2 × (Length + Width)

Enter measurements and press Calculate Perimeter.

Calculation Steps

    Note: Use the same measurement unit for all dimensions. Circle results use π at full computational precision before display rounding.

    What Is Perimeter?

    Perimeter is the total distance around the outside boundary of a two-dimensional shape. For polygons, you can find it by adding the lengths of all outer sides. Regular shapes use shorter formulas, such as P = 4s for a square and P = 2(l + w) for a rectangle. The perimeter of a circle is called its circumference.

    Use the calculator above for rectangles, squares, triangles, circles, parallelograms, trapezoids, rhombuses, kites, ellipses, annuli, regular polygons, irregular polygons, semicircles, and circular sectors. All dimensions should use the same measurement unit.

    Perimeter Formulas by Shape

    Shape Formula Required Values
    Square P = 4s Side length
    Rectangle P = 2(l + w) Length and width
    Triangle P = a + b + c Three side lengths
    Circle C = 2πr or C = πd Radius or diameter
    Parallelogram P = 2(a + b) Two adjacent sides
    Trapezoid P = a + b + c + d Four side lengths
    Rhombus P = 4s Side length
    Kite P = 2(a + b) Two pairs of adjacent equal sides
    Ellipse P ≈ π[3(a+b) − √((3a+b)(a+3b))] Semi-major and semi-minor axes
    Annulus P = 2Ï€(R + r) Outer and inner radii
    Regular Polygon P = ns Number of sides and side length
    Semicircle P = πr + 2r Radius
    Circular Sector P = 2r + (θ/360)(2πr) Radius and central angle

    Need the space inside a shape instead of the boundary length? Use our Area Calculator.

    How to Calculate Perimeter

    1. Identify the shape. Decide which perimeter formula applies.
    2. Measure the required dimensions. Use the same unit for every input.
    3. Substitute the values into the formula.
    4. Calculate and keep the result in a linear unit such as cm, m, in, or ft.

    For any polygon, the general idea is simple: add the lengths of all outside edges exactly once.

    Worked Perimeter Examples

    Rectangle Example

    A rectangle is 12 cm long and 8 cm wide.

    P = 2(l + w)
    P = 2(12 + 8)
    P = 2(20)
    P = 40 cm

    The total distance around the rectangle is 40 cm.

    Triangle Example

    A triangle has side lengths of 7 m, 9 m, and 12 m.

    P = a + b + c
    P = 7 + 9 + 12
    P = 28 m

    The triangle's perimeter is 28 m.

    Circle Example

    A circle has a radius of 7 cm.

    C = 2Ï€r
    C = 2 × π × 7
    C = 14Ï€
    C ≈ 43.9823 cm

    The circumference is approximately 43.9823 cm.

    Perimeter vs. Area

    Aspect Perimeter Area
    Meaning Distance around a shape Space inside a shape
    Units Linear units such as cm, m, ft Square units such as cm², m², ft²
    Rectangle Formula P = 2(l + w) A = l × w
    Typical Use Fencing, edging, framing Flooring, painting, covering

    Common Perimeter Mistakes

    • Mixing units: Convert every dimension to the same unit before calculating.
    • Using square units: Perimeter uses linear units, not cm², m², or ft².
    • Missing an outside edge: Every external side must be counted exactly once.
    • Double-counting shared edges: Internal edges of composite shapes are not part of the outside perimeter.
    • Confusing radius and diameter: Diameter is twice the radius. Use C = 2Ï€r for radius or C = Ï€d for diameter.

    How to Check Your Answer

    First confirm that every measurement uses the same unit. Then check that every outside edge has been included exactly once. For regular shapes, verify the result using the standard formula. Finally, make sure the answer is written in a linear unit such as cm, m, in, or ft.

    For a right triangle with a missing side, you can first use our Pythagorean Theorem Calculator and then calculate the perimeter.

    Perimeter of Irregular and Composite Shapes

    For an irregular polygon, measure each outside edge and add all side lengths together. The calculator's Custom / Irregular Polygon mode lets you enter side lengths such as 4, 7, 5, 9, 3, which gives:

    P = 4 + 7 + 5 + 9 + 3 = 28 units

    For composite shapes, count only the exposed outer boundary. Shared interior edges should not be added.

    Working with a circular sector and need its area rather than boundary length? Use the Circle Sector Area Calculator.

    Real-World Uses of Perimeter

    Perimeter is useful when estimating fencing around a garden, trim around a room, borders around artwork, edging around landscaping, or any material that follows the outside boundary of a shape.

    For surface measurements, try the Area Calculator. For three-dimensional measurements, use the Volume Calculator or Surface Area Calculator.

    Frequently Asked Questions

    Calculation methodology

    Utilixea uses standard Euclidean geometry formulas for each supported shape. Inputs are treated as linear measurements, and results are returned in the selected unit. Circle-based calculations use JavaScript's built-in numerical approximation of π, and displayed results are rounded to up to six decimal places.

    About this calculator: This tool is maintained by Utilixea. The calculation logic, examples, and validation rules are checked whenever the calculator is updated.

    Last reviewed: July 22, 2026

    Need another geometry measurement? Explore the Geometry Calculators collection for area, volume, surface area, distance, triangle, and circle tools.