{"id":869,"date":"2026-04-24T17:01:50","date_gmt":"2026-04-24T17:01:50","guid":{"rendered":"https:\/\/topsoiltippers.co.za\/?page_id=869"},"modified":"2026-04-24T17:01:50","modified_gmt":"2026-04-24T17:01:50","slug":"lawn-soil-quantity-calculator","status":"publish","type":"page","link":"https:\/\/topsoiltippers.co.za\/af\/lawn-soil-quantity-calculator\/","title":{"rendered":"Lawn &#038; Soil Quantity Calculator"},"content":{"rendered":"<h3 style=\"text-align: center;\">Take the guesswork out of your project. Use our free calculator below to find exactly how much material you need for a seamless delivery.<\/h3>\n<p>&nbsp;<\/p>\n<style>\n    #topsoil-calculator * { box-sizing: border-box; }\n    #topsoil-calculator input[type=\"number\"] {\n        margin-bottom: 0 !important;\n        box-shadow: none !important;\n        border: 1px solid #ccc !important;\n        background: #fff !important;\n        height: 45px !important;\n    }\n    .ts-toggle-container {\n        display: grid !important;\n        grid-template-columns: 1fr 1fr !important;\n        background: #f0f0f0;\n        border-radius: 8px;\n        overflow: hidden;\n        margin-bottom: 25px;\n        border: 1px solid #ddd;\n    }\n    .ts-toggle-btn {\n        padding: 14px 5px !important;\n        text-align: center !important;\n        font-weight: bold !important;\n        cursor: pointer !important;\n        transition: all 0.3s ease !important;\n        font-size: 15px !important;\n        user-select: none !important;\n        display: flex !important;\n        align-items: center !important;\n        justify-content: center !important;\n        line-height: 1.2 !important;\n        width: 100% !important;\n    }\n    \n    \/* The Visualiser Stage *\/\n    .visualiser-stage {\n        height: 240px; \/* Made slightly taller to fit the new larger badges comfortably *\/\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        background: #fafafa;\n        border: 1px inset #eaeaea;\n        border-radius: 8px;\n        margin-bottom: 20px;\n        overflow: hidden;\n        perspective: 800px; \n    }\n\n    \/* 2D Grass Square *\/\n    #shape-m2 {\n        position: relative;\n        background: #a3d9a5;\n        border: 2px solid #2d5a27;\n        border-radius: 4px;\n        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);\n        width: 0px; height: 0px; opacity: 0;\n    }\n\n    \/* 3D Volume Cube *\/\n    #shape-m3 {\n        position: relative;\n        width: 0px; height: 0px;\n        transform-style: preserve-3d;\n        transform: rotateX(-20deg) rotateY(-40deg); \n        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);\n        opacity: 0;\n    }\n    \n    .cube-face {\n        position: absolute;\n        border: 2px solid #8b6b3d;\n        top: 0; left: 0;\n        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);\n        transform-style: preserve-3d; \/* Allows badges to stick to faces *\/\n    }\n    \n    #cube-top { background: rgba(225, 200, 150, 0.85); }\n    #cube-front { background: rgba(200, 170, 120, 0.95); }\n    #cube-right { background: rgba(180, 150, 100, 0.9); }\n\n    \/* The Blueprint Edge Badges - Now larger for better UX *\/\n    .dim-badge {\n        position: absolute;\n        background: rgba(255, 255, 255, 0.95);\n        padding: 5px 8px; \/* Increased padding *\/\n        border-radius: 4px;\n        font-size: 14px; \/* Increased font size *\/\n        font-weight: 800;\n        box-shadow: 0 2px 5px rgba(0,0,0,0.15);\n        border: 1px solid rgba(0,0,0,0.1);\n        white-space: nowrap;\n        pointer-events: none;\n    }\n<\/style>\n\n<div id=\"topsoil-calculator\" style=\"background: #ffffff; padding: 30px; border-radius: 12px; border: 1px solid #e0e0e0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); max-width: 550px; color: #333; margin: 0 auto;\">\n    <h3 style=\"color: #2d5a27; margin-top: 0; font-size: 22px; margin-bottom: 20px; font-weight: bold;\">Quantity Calculator<\/h3>\n\n    <div class=\"ts-toggle-container\">\n        <div id=\"btn-m2\" class=\"ts-toggle-btn\" style=\"background: #2d5a27; color: white;\">\n            Instant Lawn (m\u00b2)\n        <\/div>\n        <div id=\"btn-m3\" class=\"ts-toggle-btn\" style=\"background: transparent; color: #555;\">\n            Products by Volume (m\u00b3)\n        <\/div>\n    <\/div>\n\n    <div class=\"visualiser-stage\">\n        \n        <div id=\"shape-m2\">\n            <div id=\"badge-2d-w\" class=\"dim-badge\" style=\"top: -32px; left: 50%; transform: translateX(-50%); color: #2d5a27;\"><\/div>\n            <div id=\"badge-2d-l\" class=\"dim-badge\" style=\"right: -60px; top: 50%; transform: translateY(-50%); color: #2d5a27;\"><\/div>\n        <\/div>\n\n        <div id=\"shape-m3\">\n            <div id=\"cube-top\" class=\"cube-face\"><\/div>\n            \n            <div id=\"cube-front\" class=\"cube-face\">\n                <div id=\"badge-3d-w\" class=\"dim-badge\" style=\"bottom: -32px; left: 50%; transform: translateX(-50%); color: #8b6b3d;\"><\/div>\n                <div id=\"badge-3d-d\" class=\"dim-badge\" style=\"left: -65px; top: 50%; transform: translateY(-50%); color: #8b6b3d;\"><\/div>\n            <\/div>\n            \n            <div id=\"cube-right\" class=\"cube-face\">\n                <div id=\"badge-3d-l\" class=\"dim-badge\" style=\"bottom: -32px; left: 50%; transform: translateX(-50%); color: #8b6b3d;\"><\/div>\n            <\/div>\n        <\/div>\n\n        <span id=\"visual-placeholder\" style=\"color: #aaa; font-size: 14px; font-style: italic;\">Enter dimensions to visualise...<\/span>\n    <\/div>\n\n    <div style=\"display: flex; gap: 15px; margin-bottom: 20px;\">\n        <div style=\"flex: 1;\">\n            <label style=\"font-size: 14px; font-weight: 600; color: #444; display: block; margin-bottom: 6px;\">Length (meter)<\/label>\n            <input type=\"number\" id=\"calc-length\" placeholder=\"0\" style=\"width: 100%; padding: 12px; border-radius: 6px; font-size: 16px;\">\n        <\/div>\n        <div style=\"flex: 1;\">\n            <label style=\"font-size: 14px; font-weight: 600; color: #444; display: block; margin-bottom: 6px;\">Width (meter)<\/label>\n            <input type=\"number\" id=\"calc-width\" placeholder=\"0\" style=\"width: 100%; padding: 12px; border-radius: 6px; font-size: 16px;\">\n        <\/div>\n    <\/div>\n\n    <div id=\"depth-container\" style=\"display: none; margin-bottom: 20px;\">\n        <label style=\"font-size: 14px; font-weight: 600; color: #444; display: block; margin-bottom: 6px;\">Desired Depth (millimeter)<\/label>\n        <input type=\"number\" id=\"calc-depth\" placeholder=\"e.g. 50\" style=\"width: 100%; padding: 12px; border-radius: 6px; font-size: 16px;\">\n        <small style=\"color: #777; display: block; margin-top: 6px; font-size: 12px;\">Recommended: 30mm for dressing, 50mm-100mm for beds.<\/small>\n    <\/div>\n\n    <div style=\"background: #f4f8f4; border: 2px solid #2d5a27; padding: 25px; border-radius: 8px; text-align: center; margin-top: 10px;\">\n        <span style=\"font-size: 15px; color: #2d5a27; font-weight: 600;\">You Will Need:<\/span><br>\n        <strong style=\"font-size: 46px; color: #2d5a27; display: block; margin: 5px 0; line-height: 1;\"><span id=\"total-result\">0<\/span> <span id=\"unit-label\">m\u00b2<\/span><\/strong>\n        \n        <div id=\"math-visual\" style=\"background: #fff; padding: 8px 12px; border-radius: 4px; font-family: monospace; font-size: 14px; color: #555; margin: 10px auto; border: 1px dashed #aaa; display: none;\"><\/div>\n\n        <div id=\"wastage-note\" style=\"margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(45,90,39,0.2);\">\n            <p style=\"font-size: 14px; font-weight: bold; margin: 0 0 5px 0; color: #2d5a27;\">(Includes 5% cutting wastage)<\/p>\n            <p style=\"font-size: 12px; margin: 0; color: #555; line-height: 1.5;\">This standard allowance covers off-cuts and edge shaping, ensuring a seamless finish without running short.<\/p>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function() {\n    let currentMode = 'm2';\n\n    const btnM2 = document.getElementById('btn-m2');\n    const btnM3 = document.getElementById('btn-m3');\n    const inputLength = document.getElementById('calc-length');\n    const inputWidth = document.getElementById('calc-width');\n    const inputDepth = document.getElementById('calc-depth');\n    const depthContainer = document.getElementById('depth-container');\n    const wastageNote = document.getElementById('wastage-note');\n    const unitLabel = document.getElementById('unit-label');\n    const mathVisual = document.getElementById('math-visual');\n    const totalResult = document.getElementById('total-result');\n    \n    \/\/ Visualiser elements\n    const placeholder = document.getElementById('visual-placeholder');\n    const shapeM2 = document.getElementById('shape-m2');\n    const shapeM3 = document.getElementById('shape-m3');\n    const cubeTop = document.getElementById('cube-top');\n    const cubeFront = document.getElementById('cube-front');\n    const cubeRight = document.getElementById('cube-right');\n    \n    \/\/ The new badges\n    const badge2dW = document.getElementById('badge-2d-w');\n    const badge2dL = document.getElementById('badge-2d-l');\n    const badge3dW = document.getElementById('badge-3d-w');\n    const badge3dL = document.getElementById('badge-3d-l');\n    const badge3dD = document.getElementById('badge-3d-d');\n\n    if (!btnM2) return;\n\n    btnM2.addEventListener('click', function() {\n        currentMode = 'm2';\n        btnM2.style.background = '#2d5a27'; btnM2.style.color = 'white';\n        btnM3.style.background = 'transparent'; btnM3.style.color = '#555';\n        \n        depthContainer.style.display = 'none';\n        wastageNote.style.display = 'block';\n        unitLabel.innerText = 'm\u00b2';\n        runCalc();\n    });\n\n    btnM3.addEventListener('click', function() {\n        currentMode = 'm3';\n        btnM3.style.background = '#2d5a27'; btnM3.style.color = 'white';\n        btnM2.style.background = 'transparent'; btnM2.style.color = '#555';\n        \n        depthContainer.style.display = 'block';\n        wastageNote.style.display = 'none';\n        unitLabel.innerText = 'm\u00b3';\n        runCalc();\n    });\n\n    inputLength.addEventListener('input', runCalc);\n    inputWidth.addEventListener('input', runCalc);\n    inputDepth.addEventListener('input', runCalc);\n\n    function runCalc() {\n        const l = parseFloat(inputLength.value) || 0;\n        const w = parseFloat(inputWidth.value) || 0;\n        const d = parseFloat(inputDepth.value) || 0;\n        let total = 0;\n\n        if (l > 0 && w > 0) {\n            mathVisual.style.display = 'inline-block';\n            placeholder.style.display = 'none';\n        } else {\n            mathVisual.style.display = 'none';\n            placeholder.style.display = 'block';\n            shapeM2.style.opacity = '0';\n            shapeM3.style.opacity = '0';\n        }\n\n        if (currentMode === 'm2') {\n            const baseArea = l * w;\n            total = Math.ceil(baseArea * 1.05);\n            mathVisual.innerHTML = l + \"m \u00d7 \" + w + \"m = <b>\" + baseArea + \"m\u00b2<\/b> base area\";\n            \n            if(l > 0 && w > 0) {\n                shapeM3.style.display = 'none';\n                shapeM3.style.opacity = '0';\n                shapeM2.style.display = 'block';\n                \n                setTimeout(() => shapeM2.style.opacity = '1', 10);\n                \n                const maxDim = Math.max(l, w);\n                shapeM2.style.width = Math.max((w \/ maxDim) * 140, 40) + 'px';\n                shapeM2.style.height = Math.max((l \/ maxDim) * 140, 40) + 'px';\n                \n                \/\/ Update the 2D Badges\n                badge2dW.innerText = w + \"m\";\n                badge2dL.innerText = l + \"m\";\n            }\n            \n        } else {\n            const depthM = d \/ 1000; \n            total = Math.ceil((l * w * depthM) * 10) \/ 10;\n            mathVisual.innerHTML = d > 0 ? l + \"m \u00d7 \" + w + \"m \u00d7 \" + depthM + \"m = <b>\" + total + \"m\u00b3<\/b>\" : \"Awaiting depth...\";\n            \n            if(l > 0 && w > 0) {\n                shapeM2.style.display = 'none';\n                shapeM2.style.opacity = '0';\n                shapeM3.style.display = 'block';\n                setTimeout(() => shapeM3.style.opacity = '1', 10);\n\n                const maxDim = Math.max(l, w);\n                const visW = Math.max((w \/ maxDim) * 100, 30); \n                const visL = Math.max((l \/ maxDim) * 100, 30); \n                const visD = Math.max((d \/ 1000) * 30, 25); \n                \n                cubeTop.style.width = visW + 'px';\n                cubeTop.style.height = visL + 'px';\n                cubeTop.style.transform = `translate(-50%, -50%) rotateX(90deg) translateZ(${visD \/ 2}px)`;\n\n                cubeFront.style.width = visW + 'px';\n                cubeFront.style.height = visD + 'px';\n                cubeFront.style.transform = `translate(-50%, -50%) translateZ(${visL \/ 2}px)`;\n\n                cubeRight.style.width = visL + 'px';\n                cubeRight.style.height = visD + 'px';\n                cubeRight.style.transform = `translate(-50%, -50%) rotateY(90deg) translateZ(${visW \/ 2}px)`;\n\n                \/\/ Update the 3D Badges\n                badge3dW.innerText = w + \"m\";\n                badge3dL.innerText = l + \"m\";\n                \n                \/\/ Only show depth measurement if they have entered one\n                if (d > 0) {\n                    badge3dD.style.display = 'block';\n                    badge3dD.innerText = d + \"mm\";\n                } else {\n                    badge3dD.style.display = 'none';\n                }\n            }\n        }\n        totalResult.innerText = total;\n    }\n});\n<\/script>\n<h3 data-path-to-node=\"12\"><\/h3>\n<p>&nbsp;<\/p>\n<h3 data-path-to-node=\"12\">How to Use the Quantity Calculator<\/h3>\n<p data-path-to-node=\"13\"><b data-path-to-node=\"13\" data-index-in-node=\"0\">Step 1: Choose Your Material<\/b><\/p>\n<ul data-path-to-node=\"14\">\n<li>\n<p data-path-to-node=\"14,0,0\">Click <b data-path-to-node=\"14,0,0\" data-index-in-node=\"6\">Instant Lawn<\/b> if you are measuring for new grass rolls.<\/p>\n<\/li>\n<li>\n<p data-path-to-node=\"14,1,0\">Click <b data-path-to-node=\"14,1,0\" data-index-in-node=\"6\">Products by Volume<\/b> if you are ordering compost, topsoil, lawn dressing or building material.<\/p>\n<\/li>\n<\/ul>\n<p data-path-to-node=\"15\"><b data-path-to-node=\"15\" data-index-in-node=\"0\">Step 2: Enter Your Measurements<\/b><\/p>\n<ul data-path-to-node=\"16\">\n<li>\n<p data-path-to-node=\"16,0,0\">Measure the area you want to cover in your garden. Type the <b data-path-to-node=\"16,0,0\" data-index-in-node=\"60\">Length (meter)<\/b> and <b data-path-to-node=\"16,0,0\" data-index-in-node=\"79\">Width (meter)<\/b> into the boxes.<\/p>\n<\/li>\n<\/ul>\n<p data-path-to-node=\"17\"><b data-path-to-node=\"17\" data-index-in-node=\"0\">Step 3: Add the Depth (Volume Only)<\/b><\/p>\n<ul data-path-to-node=\"18\">\n<li>\n<p data-path-to-node=\"18,0,0\">If you are buying soil or compost, tell us how thick you want the layer to be by typing into the <b data-path-to-node=\"18,0,0\" data-index-in-node=\"97\">Desired Depth (millimeter)<\/b> box.<\/p>\n<\/li>\n<li>\n<p data-path-to-node=\"18,1,0\"><i data-path-to-node=\"18,1,0\" data-index-in-node=\"0\">Tip: We recommend 30mm for lawn dressing, and between 50mm to 100mm for new garden beds.<\/i><\/p>\n<\/li>\n<\/ul>\n<p data-path-to-node=\"19\"><b data-path-to-node=\"19\" data-index-in-node=\"0\">Step 4: Get Your Total<\/b><\/p>\n<ul data-path-to-node=\"20\">\n<li>\n<p data-path-to-node=\"20,0,0\">The calculator will instantly draw your shape and display exactly what you need to order in the green box below.<\/p>\n<\/li>\n<li>\n<p data-path-to-node=\"20,1,0\"><i data-path-to-node=\"20,1,0\" data-index-in-node=\"0\">Note: If you selected Instant Lawn, the calculator automatically adds a 5% allowance to ensure you have enough grass for edge shaping and off-cuts!<\/i><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Take the guesswork out of your project. Use our free calculator below to find exactly how much material you need for a seamless delivery. &nbsp; &nbsp; How to Use the Quantity Calculator Step 1: Choose Your Material Click Instant Lawn if you are measuring for new grass rolls. Click Products by Volume if you are [&#8230;]\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-blank-title-center.php","meta":{"_joinchat":[],"footnotes":""},"class_list":["post-869","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/pages\/869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/comments?post=869"}],"version-history":[{"count":15,"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/pages\/869\/revisions"}],"predecessor-version":[{"id":887,"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/pages\/869\/revisions\/887"}],"wp:attachment":[{"href":"https:\/\/topsoiltippers.co.za\/af\/wp-json\/wp\/v2\/media?parent=869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}