Simple Area Calculator
Copy templates to use them anywhere:
This Simple Area Calculator allows you to choose between multiple shapes to calculate their area. This calculator can find the area of a circle, a square, a rectangle, and a trapezoid.
Simple Area Calculator
{formmenu: default=Circle; Triangle; Rectangle; Trapezoid; name=Shape; multiple=no; trim=yes}
{if: Shape = "Circle"; trim=left} Enter the radius {formtext: name=radius; default=3; cols=7} {if: isnumber(radius); trim=left} The area of this circle is {=3.14159 * radius^2; format=,.2f} {else} {error: enter a number in the text field} {endif}
{elseif: Shape = "Triangle"; trim=left} Enter the Base {formtext: name=base1; default=3; cols=7} Enter the Height {formtext: name=height1; default=5; cols=7} {if: isnumber(base1) and isnumber(height1); trim=left} The area of the triangle is {=height1 * base1 * 0.5; format=,.2f} {else} {error: enter a number in the text field} {endif}
{elseif: Shape = "Rectangle"; trim=left} Enter the Base {formtext: name=base2; default=5; cols=7} Enter the Height {formtext: name=height2; default=4; cols=7} {if: isnumber(base2) and isnumber(height2); trim=left} The area of the rectangle is {=base2 * height2; format=,.2f} {else} {error: enter a number in the text field} {endif}
{elseif: Shape = "Trapezoid"; trim=left} Enter the bottom Base {formtext: name=base3; default=5; cols=7} Enter the top Base{formtext: name=base4; default=3; cols=7} Enter the Height {formtext: name=height3; default=4; cols=7} {if: isnumber(base3) and isnumber(base4) and isnumber(height3); trim=left} The area of the trapezoid is {=(base3+base4) / 2 * height3; format=,.2f} {else} {error: please enter valid charaters in the text fields above.} {endif} {endif: trim=yes}
Formulas
Area of a Circle The formula to calculate the area of a circle is 𝜋 * radius^2.
Area of a Triangle The formula to calculate the area of a triangle is base * height / 2.
Area of a Rectangle The formula to calculate the area of a rectangle is base * height.
Area of a Trapezoid The formula to calculate the area of a trapezoid is (top base + bottom base)/2 * height.