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.
Area and Perimeter Calculator for 2D shapes

Daily Test with Code Example

Which tag is a block element?
<div> <img> <span>
<div>Web Programming and Development</div>
Which CSS code displays the text underlined?
font-style: italic; text-decoration: underline; font-weight: 500;
h2 {
  text-decoration: underline;
Click on the JavaScript function that can access other function after a specified time.
insertBefore() setTimeout() querySelector()
function someFunction() { alert(""); }
setTimeout("someFunction()", 2000);
Click on the instruction that returns the number of items of a multidimensional array in PHP.
count($array) count($array, 1) strlen()
$food = array("fruits" => array("banana", "apple"), "veggie" => array("collard", "pea"));
$nr_food = count($food, 1);
echo $nr_food;       // 6

Last accessed pages

  1. Create simple Website with PHP (9441)
  2. Volume and Surface Area Calculator for 3D objects (4441)
  3. The Fifth Agreement (9101)
  4. The Stage, Panels and Tools in Flash (3697)
  5. Get the value of the selected /checked checkboxes in a form (16913)

Top accessed pages

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