The script presented in this page is a tool to calculate surface area, perimeter and other dimensions (radius, diagonal, height) of various 2D geometrical shapes: circle, ellipse, triangle, hexagon, parallelogram, rectangle, rhombus, square, trapezoid.
This calculator shows also the mathematical formulas used to calculate the area, perimeter, and the other dimensions.

Calculate Area and Perimeter

JavaScript script to calculate surface area and perimeter.
Find area and perimeter of various 2d geometrical shapes.

Select an object

• To Download this script, click: Area and Perimeter Calculator.

Daily Test with Code Example

Which tag is used to include external CSS file in web page?
<body> <script> <link>
<link href="/templ/style.css" rel="stylesheet" type="text/css" />
Which CSS property sets the text size?
font-weight text-decoration font-size
h2 {
  font-size: 1em;
Indicate the JavaScript property that can add HTML code into an element.
text value innerHTML
document.getElementById("someID").innerHTML = "HTML content";
Click on the function that returns the number of characters of a string in PHP.
count() strlen() stristr()
$str = "";
$nr_chr = strlen($str);
echo $nr_chr;       // 22
Area and Perimeter Calculator for 2D shapes

Last accessed pages

  1. PHP Error Handling and Debugging (1673)
  2. SSEP - Site Search Engine PHP-Ajax (3150)
  3. Read Excel file data in PHP - PhpExcelReader (25778)
  4. Working with HTML attributes in PHP (2517)
  5. Polygons with CSS (4100)

Top accessed pages

  1. Courses Web: PHP-MySQL JavaScript Ajax HTML CSS Flash-AS3 (33795)
  2. PHP-MySQL free course, online tutorials PHP MySQL code (27294)
  3. Get Attribute (ID, Class, Name, Title, Src) with jQuery (25887)
  4. Read Excel file data in PHP - PhpExcelReader (25778)
  5. PHP PDO - exec (INSERT, UPDATE, DELETE) MySQL (22626)