面积与周长计算器

计算矩形、正方形、圆和三角形的面积、周长、对角线与角度,并展示计算过程。

Shape
Width / Radius / Side A
Height
Side C

The formulas

Rectangle

Area      = width x height
Perimeter = 2 x (width + height)
Diagonal  = sqrt(width² + height²)

Square

Area      = side²
Perimeter = 4 x side
Diagonal  = side x sqrt(2)

Circle

Area         = pi x radius²
Circumference = 2 x pi x radius
Diameter     = 2 x radius

Triangle

For any three sides, Heron's formula gives the area:

s    = (a + b + c) / 2
Area  = sqrt(s x (s-a) x (s-b) x (s-c))

The height relative to side a is 2 x Area / a, and the three angles come from the law of cosines:

angle_A = arccos((b² + c² - a²) / (2bc))

Why the formula matters

Heron's formula is the general case — it works for any triangle given its three sides, including obtuse and scalene ones. The formula you learned at school, area = 0.5 x base x height, is a special case that requires you to already know the height.

For land and construction work, remember that the units matter: area in m², and land is often quoted in hectares (1 ha = 10,000 m²) or acres (1 acre = 4,046.86 m²).

Related

Need a percentage of a total? The percentage calculator handles every common case.

常见问题

How is the area of a triangle calculated?

Heron's formula: with s as the semi-perimeter, the area is sqrt(s * (s-a) * (s-b) * (s-c)). It works for any three sides, including scalene and obtuse triangles.

Which units does it use?

The output is in the same units you entered, so the result is unitless square units. Area in m², and land is often quoted in hectares or acres.

Can I get the angles of a triangle?

Yes. The triangle option lists all three angles, computed with the law of cosines.

What is the aspect ratio of a rectangle?

The ratio of width to height, simplified by their greatest common divisor, so 1920x1080 becomes 16:9.

How do I convert between square metres and hectares?

One hectare is 10,000 m². Divide square metres by 10,000 to get hectares.