{"id":1973,"date":"2026-06-17T09:11:45","date_gmt":"2026-06-17T16:11:45","guid":{"rendered":"https:\/\/americansoil.com\/wordpress\/?page_id=1973"},"modified":"2026-06-17T17:08:04","modified_gmt":"2026-06-18T00:08:04","slug":"calculator","status":"publish","type":"page","link":"https:\/\/americansoil.com\/wordpress\/calculator\/","title":{"rendered":"Calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1973\" class=\"elementor elementor-1973\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b1d2ee5 e-con-full e-flex e-con e-parent\" data-id=\"b1d2ee5\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-a21ca8a e-con-full e-flex e-con e-child\" data-id=\"a21ca8a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4915a2b elementor-widget elementor-widget-html\" data-id=\"4915a2b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script language=\"JavaScript1.2\" type=\"text\/javascript\">\n\tfunction calculate(formObj) {\n\t\tvar theAmount = 0;\n    for (var i = 1; i <= 2; i++) {\n       var parsecheck = \"\" + parseFloat(formObj.elements[i].value);\n       if (\tparseFloat(formObj.elements[i].value) < 0 ||\n\t\t\t  \t\tparseFloat(formObj.elements[i].value) == 0 || \n\t\t\t\t\t\tparsecheck == \"NaN\"\t||\n\t\t\t\t\t\t((formObj.elements[i].value)\/(formObj.elements[i].value)!=1)&&(formObj.elements[i].value !=0)) \n\t\t\t {\n          alert(\"Length, width and depth must be numeric\\nand greater than zero, please try again!\");\n          return false;\n       }\n    }\n    theAmount = (formObj.hight.value * formObj.width.value *\n                (formObj.depth.value \/ GetSelectedButton(formObj.depthMeasure)) \/ 27.0);\n\n    formObj.areaAnswer.value = formatAnswer(theAmount,4);\n\t\t\/\/\tif the volumn or unit unit of measure is different than the volumn unit of measure\n\t\t\/\/\tof the calculation factor then display the calculation factor\n\t\tif (formObj.useCalcFactor.value==\"1\") {\n\t\t\tvar theAnswer = theAmount * formObj.theCalcFactor.value;\n\t\t\tformObj.Answer.value = formatAnswer(theAnswer,4);\n\t\t}\n    return true;\t\n\t}\n\n\tfunction  GetSelectedButton(RadioObj) {\n\t\t\tfor (var i=0; i<RadioObj.length; i++) {\n\t\t\t\tif (RadioObj[i].checked)\n\t\t\t\t\treturn RadioObj[i].value;\n\t\t\t}\n\t\t}\n\n\tfunction formatAnswer(input, rsize) {\n  \tvar invalid = \"**************************\";\n  \tvar highVal = \"999999999999999999999999\";\n   \tvar inString = \"\" + input;\n   \tvar floatIn = parseFloat(inString);\n   \tif (inString.indexOf(\"e\") != -1 || floatIn > parseFloat(highVal.substring(0,rsize)+\".4\"))\n      return invalid.substring(0, rsize);\n   \tif (inString.length <= rsize) return inString;\n   \tvar rounded = \"\" + (floatIn + (floatIn - parseFloat(inString.substring(0, rsize))));\n\t   return rounded.substring(0, rsize);\n\t}\n<\/script>\n\n\n\n\n\t\n\t\t\t\t\n\t\t\t\t<h2 align=\"center\" style=background-color:#B36943>Volume Calculator<\/h2>\n\n\t<form name=\"calculator\" method=\"post\">\n\t<table border=\"0\" width=\"30\" style=\"background-color:white; opacity: 1; color: black\">\n\t\t<tr>\n\t\t\t<td align=\"left\" valign=\"top\"><input type=\"text\" name=\"hight\" size=\"3\" maxlength=\"3\"><br>\n\t\t\t\t<b>Length<\/b><br>(feet)<\/td>\n\t\t\t<td align=\"center\" valign=\"top\" width=\"20\">x<\/td>\n\t\t\t<td align=\"left\" valign=\"top\"><input type=\"text\" name=\"width\" size=\"3\" maxlength=\"3\"><br>\n\t\t\t\t<b>Width<\/b><br>(feet)<\/td>\n\t\t\t<td align=\"center\" valign=\"top\" width=\"20\">x<\/td>\n\t\t\t<td align=\"left\" valign=\"top\"><input type=\"text\" name=\"depth\" size=\"3\" maxlength=\"3\"><br>\n\t\t\t\t<br>\n\t\t\t\t<b>Depth<\/b><br>\n\t\t\t\t<INPUT CHECKED name=depthMeasure type=radio value=12>inches<br>\n\t\t\t\t<INPUT name=depthMeasure type=radio value=1>feet<\/td>\n\t\t\t<td align=\"center\" valign=\"top\" width=\"20\">=<\/td>\n\t\t\t<td align=\"center\" valign=\"top\">\n\t\t\t\t<input type=\"text\" name=\"areaAnswer\" size=\"3\" maxlength=\"3\" readonly readonly=\"YES\"><br>\n\t\t\t\t<br>\n\t\t\t\t<b>Yard(s)<\/b><\/td>\n\t\t<\/tr>\n\t\t<tr>\n\t\t\t<td colspan=\"7\" align=\"center\" nowrap  class=\"std\">\n\t\t\t\t<input type=\"button\" name=\"CALC\" style=\"background-color: #B36943; color:black\" value=\"Calculate\" onClick=\"calculate(document.calculator)\">\n\t\t\t\t<input type=\"Reset\"><\/td>\n\t\t<\/tr>\n\t<\/table>\n<\/form>\n\n\t\t\t<\/div>\n\t\t\t\n\t\t<\/td>\n\t\t\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Volume Calculator Length(feet) x Width(feet) x Depth inches feet = Yard(s)<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1973","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/pages\/1973","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1973"}],"version-history":[{"count":76,"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/pages\/1973\/revisions"}],"predecessor-version":[{"id":2070,"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/pages\/1973\/revisions\/2070"}],"wp:attachment":[{"href":"https:\/\/americansoil.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}