{"id":1818,"date":"2026-05-21T06:42:14","date_gmt":"2026-05-21T06:42:14","guid":{"rendered":"https:\/\/aiper.com\/blogs\/?page_id=1818"},"modified":"2026-06-24T03:45:44","modified_gmt":"2026-06-24T03:45:44","slug":"pool-sand-calculator","status":"publish","type":"page","link":"https:\/\/aiper.com\/blogs\/pool-sand-calculator\/","title":{"rendered":"Pool Sand Calculator"},"content":{"rendered":"\n<div class=\"pool-sand-calc-container\">\n    <div class=\"psc-header\">\n        <h2>Pool Sand <a href=\"https:\/\/aiper.com\/blogs\/pool-saturation-index-calculator\/\">Calculator<\/a><\/h2>\n        <p>Accurately estimate the volume, weight, and total cost of sand required for your pool installation or base layer.<\/p>\n    <\/div>\n\n    <div class=\"psc-section\">\n        <label class=\"psc-section-title\"><span class=\"psc-step-badge\">1<\/span> Select Pool Shape<\/label>\n        <div class=\"psc-shape-grid\">\n            <div class=\"psc-shape-card active\" data-shape=\"Rectangle\">\n                <svg viewBox=\"0 0 24 24\"><rect x=\"3\" y=\"6\" width=\"18\" height=\"12\" rx=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"\/><\/svg>\n                <span>Rectangle<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"L-shaped\">\n                <svg viewBox=\"0 0 24 24\"><path d=\"M5 5 v14 h14 v-7 h-7 v-7 z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linejoin=\"round\"\/><\/svg>\n                <span>L-Shaped<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"Circle\">\n                <svg viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"8\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"\/><\/svg>\n                <span>Circle<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"Triangle\">\n                <svg viewBox=\"0 0 24 24\"><polygon points=\"12,4 4,19 20,19\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\" stroke-linejoin=\"round\"\/><\/svg>\n                <span>Triangle<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"Kidney\">\n                <svg viewBox=\"0 0 24 24\"><path d=\"M12 4C7 4 4 8 4 12C4 16 8 15 12 19C16 23 20 16 20 12C20 8 17 4 12 4Z\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"\/><\/svg>\n                <span>Kidney<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"Oval\">\n                <svg viewBox=\"0 0 24 24\"><ellipse cx=\"12\" cy=\"12\" rx=\"9\" ry=\"6\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"\/><\/svg>\n                <span>Oval<\/span>\n            <\/div>\n            <div class=\"psc-shape-card\" data-shape=\"Oblong\">\n                <svg viewBox=\"0 0 24 24\"><rect x=\"4\" y=\"6\" width=\"16\" height=\"12\" rx=\"6\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"2\"\/><\/svg>\n                <span>Oblong<\/span>\n            <\/div>\n        <\/div>\n        <input type=\"hidden\" id=\"psc-selected-shape\" value=\"Rectangle\">\n    <\/div>\n\n    <div class=\"psc-section\">\n        <label class=\"psc-section-title\"><span class=\"psc-step-badge\">2<\/span> Measurement Unit<\/label>\n        <div class=\"psc-unit-toggle-container\">\n            <button type=\"button\" class=\"psc-unit-btn active\" data-unit=\"ft\">Feet (ft)<\/button>\n            <button type=\"button\" class=\"psc-unit-btn\" data-unit=\"in\">Inches (in)<\/button>\n            <button type=\"button\" class=\"psc-unit-btn\" data-unit=\"yd\">Yards (yd)<\/button>\n            <button type=\"button\" class=\"psc-unit-btn\" data-unit=\"cm\">Centimeters (cm)<\/button>\n            <button type=\"button\" class=\"psc-unit-btn\" data-unit=\"m\">Meters (m)<\/button>\n        <\/div>\n        <input type=\"hidden\" id=\"psc-selected-unit\" value=\"ft\">\n    <\/div>\n\n    <div class=\"psc-section\">\n        <label class=\"psc-section-title\"><span class=\"psc-step-badge\">3<\/span> Enter Pool Size Dimensions<\/label>\n        <div id=\"psc-dynamic-fields\" class=\"psc-input-grid\">\n            <\/div>\n    <\/div>\n\n    <div class=\"psc-section\">\n        <label class=\"psc-section-title\"><span class=\"psc-step-badge\">4<\/span> Pricing &#038; Currency<\/label>\n        <div class=\"psc-input-grid row-2\">\n            <div class=\"psc-input-wrapper\">\n                <label for=\"psc-currency\">Currency<\/label>\n                <select id=\"psc-currency\" class=\"psc-form-control\">\n                    <option value=\"USD\">USD ($)<\/option>\n                    <option value=\"AUD\">AUD ($)<\/option>\n                    <option value=\"EUR\">EUR (\u20ac)<\/option>\n                <\/select>\n            <\/div>\n            <div class=\"psc-input-wrapper\">\n                <label for=\"psc-price-per-ton\">Price Per Ton<\/label>\n                <input type=\"number\" id=\"psc-price-per-ton\" class=\"psc-form-control\" value=\"50\" min=\"0\" step=\"any\">\n            <\/div>\n        <\/div>\n\n        <div class=\"psc-regional-info\">\n            <div class=\"psc-regional-tab-headers\">\n                <span class=\"psc-reg-tab active\" data-region=\"us\">US Pricing Reference<\/span>\n                <span class=\"psc-reg-tab\" data-region=\"au\">Australia Pricing<\/span>\n                <span class=\"psc-reg-tab\" data-region=\"eu\">Europe Pricing<\/span>\n            <\/div>\n            <div class=\"psc-regional-tab-content\">\n                <div id=\"psc-reg-us\" class=\"psc-reg-panel active\">\n                    <p><strong>Material Cost:<\/strong> $15 \u2013 $60\/ton. <strong>With Delivery\/Fees:<\/strong> $50 \u2013 $150\/ton.<\/p>\n                    <ul>\n                        <li>Fill Sand: $15 \u2013 $40\/ton<\/li>\n                        <li>Concrete Sand: $25 \u2013 $50\/ton<\/li>\n                        <li>Mason \/ Pool Base Sand: $50 \u2013 $65+\/ton<\/li>\n                        <li>Specialty \/ Play Sand: $40 \u2013 $100+\/ton<\/li>\n                    <\/ul>\n                <\/div>\n                <div id=\"psc-reg-au\" class=\"psc-reg-panel\">\n                    <p><strong>Average Range:<\/strong> $60 \u2013 $150 AUD\/metric ton based on processing and location.<\/p>\n                    <ul>\n                        <li>Bulk &#038; Fill Sand: $45 \u2013 $75\/ton<\/li>\n                        <li>Brickies &#038; Paving Sand: $64 \u2013 $95\/ton<\/li>\n                        <li>Washed River Sand: $60 \u2013 $95\/ton<\/li>\n                        <li>Certified Play Sand: $130 \u2013 $153\/ton<\/li>\n                    <\/ul>\n                <\/div>\n                <div id=\"psc-reg-eu\" class=\"psc-reg-panel\">\n                    <p><strong>Average Range:<\/strong> $30 \u2013 $150\/ton. Import benchmarks average around $60 \u2013 $63\/ton.<\/p>\n                    <ul>\n                        <li>Construction Sand &#038; Gravel: $30 \u2013 $60\/ton<\/li>\n                        <li>Industrial Silica Sand: $60 \u2013 $150+\/ton<\/li>\n                        <li>Specialty High-Purity Grades: Multiples of baseline rates<\/li>\n                    <\/ul>\n                <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n\n    <div class=\"psc-action-container\">\n        <button type=\"button\" id=\"psc-calculate-btn\" class=\"psc-submit-btn\">Calculate it<\/button>\n    <\/div>\n\n    <div id=\"psc-results-container\" class=\"psc-results-wrapper\" style=\"display: none;\">\n        <h3 class=\"psc-results-heading\">Calculation Results<\/h3>\n        <div class=\"psc-results-grid\">\n            <div class=\"psc-result-card\">\n                <div class=\"psc-result-header\">\n                    <span class=\"psc-result-title\">Sand Volume<\/span>\n                    <select id=\"psc-volume-unit-toggle\" class=\"psc-mini-toggle\">\n                        <option value=\"gallons\">Gallons<\/option>\n                        <option value=\"liters\">Liters<\/option>\n                        <option value=\"m3\" selected>Cubic Meters (m\u00b3)<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"psc-result-value\" id=\"psc-output-volume\">0.00<\/div>\n            <\/div>\n\n            <div class=\"psc-result-card\">\n                <div class=\"psc-result-header\">\n                    <span class=\"psc-result-title\">Sand Weight<\/span>\n                    <select id=\"psc-weight-unit-toggle\" class=\"psc-mini-toggle\">\n                        <option value=\"tonnes\" selected>Tonnes (t)<\/option>\n                        <option value=\"kg\">Kilograms (kg)<\/option>\n                        <option value=\"lbs\">Pounds (lbs)<\/option>\n                    <\/select>\n                <\/div>\n                <div class=\"psc-result-value\" id=\"psc-output-weight\">0.00<\/div>\n            <\/div>\n\n            <div class=\"psc-result-card highlighted\">\n                <div class=\"psc-result-header\">\n                    <span class=\"psc-result-title\">Estimated Sand Cost<\/span>\n                    <span class=\"psc-currency-indicator\" id=\"psc-output-currency-label\">USD<\/span>\n                <\/div>\n                <div class=\"psc-result-value\" id=\"psc-output-cost\">0.00<\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<style>\n\/* Scoped CSS styling matching WordPress core paradigms *\/\n.pool-sand-calc-container {\n    max-width: 800px;\n    margin: 20px auto;\n    background: #ffffff;\n    border: 1px solid #e2e8f0;\n    border-radius: 12px;\n    padding: 30px;\n    font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n    color: #334155;\n    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);\n    box-sizing: border-box;\n}\n.pool-sand-calc-container *, .pool-sand-calc-container *::before, .pool-sand-calc-container *::after {\n    box-sizing: border-box;\n}\n.psc-header {\n    text-align: center;\n    margin-bottom: 30px;\n    border-bottom: 2px solid #f1f5f9;\n    padding-bottom: 20px;\n}\n.psc-header h2 {\n    margin: 0 0 10px 0;\n    color: #0f172a;\n    font-size: 28px;\n    font-weight: 700;\n}\n.psc-header p {\n    margin: 0;\n    color: #64748b;\n    font-size: 15px;\n    line-height: 1.5;\n}\n.psc-section {\n    margin-bottom: 30px;\n}\n.psc-section-title {\n    display: block;\n    font-size: 16px;\n    font-weight: 600;\n    color: #0f172a;\n    margin-bottom: 15px;\n}\n.psc-step-badge {\n    display: inline-block;\n    width: 24px;\n    height: 24px;\n    line-height: 24px;\n    text-align: center;\n    background-color: #1ecad3;\n    color: white;\n    border-radius: 50%;\n    font-size: 12px;\n    margin-right: 8px;\n    font-weight: bold;\n    vertical-align: middle;\n}\n.psc-shape-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));\n    gap: 12px;\n}\n@media (max-width: 600px) {\n    .psc-shape-grid {\n        grid-template-columns: repeat(3, 1fr);\n    }\n}\n.psc-shape-card {\n    border: 2px solid #e2e8f0;\n    border-radius: 8px;\n    padding: 15px 10px;\n    text-align: center;\n    cursor: pointer;\n    transition: all 0.2s ease;\n    background: #f8fafc;\n}\n.psc-shape-card:hover {\n    border-color: #1ecad3;\n    background: #f0fdfa;\n}\n.psc-shape-card.active {\n    border-color: #1ecad3;\n    background: #e6fbfb;\n    color: #0f172a;\n    font-weight: 600;\n}\n.psc-shape-card svg {\n    width: 32px;\n    height: 32px;\n    margin-bottom: 8px;\n    color: #64748b;\n    fill: none;\n}\n.psc-shape-card.active svg {\n    color: #1ecad3;\n}\n.psc-shape-card span {\n    display: block;\n    font-size: 12px;\n}\n.psc-unit-toggle-container {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 8px;\n}\n.psc-unit-btn {\n    flex: 1;\n    min-width: 80px;\n    background: #ffffff;\n    border: 1px solid #cbd5e1;\n    padding: 10px 14px;\n    font-size: 14px;\n    border-radius: 6px;\n    cursor: pointer;\n    transition: all 0.2s;\n    text-align: center;\n    color: #475569;\n}\n.psc-unit-btn:hover {\n    background: #f8fafc;\n    border-color: #94a3b8;\n}\n.psc-unit-btn.active {\n    background: #1ecad3;\n    color: #ffffff;\n    border-color: #1ecad3;\n    font-weight: 500;\n}\n.psc-input-grid {\n    display: grid;\n    grid-template-columns: repeat(2, 1fr);\n    gap: 16px;\n}\n@media (max-width: 500px) {\n    .psc-input-grid {\n        grid-template-columns: 1fr;\n    }\n}\n.psc-input-grid.row-2 {\n    grid-template-columns: repeat(2, 1fr);\n}\n.psc-input-wrapper {\n    display: flex;\n    flex-direction: column;\n}\n.psc-input-wrapper label {\n    font-size: 13px;\n    font-weight: 500;\n    color: #475569;\n    margin-bottom: 6px;\n}\n.psc-form-control {\n    width: 100%;\n    padding: 10px 14px;\n    font-size: 15px;\n    border: 1px solid #cbd5e1;\n    border-radius: 6px;\n    color: #1e293b;\n    background-color: #ffffff;\n    outline: none;\n}\n.psc-form-control:focus {\n    border-color: #1ecad3;\n    box-shadow: 0 0 0 3px rgba(30, 202, 211, 0.15);\n}\n.psc-regional-info {\n    margin-top: 20px;\n    border: 1px solid #e2e8f0;\n    border-radius: 8px;\n    overflow: hidden;\n    background: #fafafa;\n}\n.psc-regional-tab-headers {\n    display: flex;\n    background: #f1f5f9;\n    border-bottom: 1px solid #e2e8f0;\n}\n.psc-reg-tab {\n    flex: 1;\n    padding: 10px;\n    font-size: 12px;\n    text-align: center;\n    font-weight: 500;\n    color: #64748b;\n    cursor: pointer;\n}\n.psc-reg-tab:hover {\n    background: #e2e8f0;\n}\n.psc-reg-tab.active {\n    background: #ffffff;\n    color: #1ecad3;\n    font-weight: 600;\n    border-top: 2px solid #1ecad3;\n}\n.psc-regional-tab-content {\n    padding: 15px;\n}\n.psc-reg-panel {\n    display: none;\n}\n.psc-reg-panel.active {\n    display: block;\n}\n.psc-reg-panel p {\n    margin: 0 0 10px 0;\n    font-size: 13px;\n    line-height: 1.4;\n}\n.psc-reg-panel ul {\n    margin: 0;\n    padding-left: 20px;\n    font-size: 12px;\n    color: #475569;\n}\n.psc-reg-panel li {\n    margin-bottom: 4px;\n}\n.psc-action-container {\n    text-align: center;\n    margin-top: 35px;\n    margin-bottom: 35px;\n}\n.psc-submit-btn {\n    background-color: #1ecad3;\n    color: #ffffff;\n    border: none;\n    padding: 14px 40px;\n    font-size: 16px;\n    font-weight: 600;\n    border-radius: 8px;\n    cursor: pointer;\n    box-shadow: 0 4px 6px -1px rgba(30, 202, 211, 0.3);\n    transition: background-color 0.2s, transform 0.1s;\n}\n.psc-submit-btn:hover {\n    background-color: #16b4bd;\n}\n.psc-submit-btn:active {\n    transform: scale(0.98);\n}\n.psc-results-wrapper {\n    background: #f8fafc;\n    border: 2px solid #e2e8f0;\n    border-radius: 10px;\n    padding: 24px;\n    animation: pscFadeIn 0.4s ease-out;\n}\n.psc-results-heading {\n    margin: 0 0 20px 0;\n    font-size: 18px;\n    font-weight: 600;\n    color: #0f172a;\n    text-align: center;\n}\n.psc-results-grid {\n    display: grid;\n    grid-template-columns: repeat(3, 1fr);\n    gap: 16px;\n}\n@media (max-width: 680px) {\n    .psc-results-grid {\n        grid-template-columns: 1fr;\n    }\n}\n.psc-result-card {\n    background: #ffffff;\n    border: 1px solid #e2e8f0;\n    border-radius: 8px;\n    padding: 16px;\n}\n.psc-result-card.highlighted {\n    border-color: #1ecad3;\n    background: #f0fdfa;\n}\n.psc-result-header {\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n    margin-bottom: 12px;\n}\n.psc-result-title {\n    font-size: 13px;\n    font-weight: 600;\n    color: #64748b;\n}\n.psc-result-card.highlighted .psc-result-title {\n    color: #0d9488;\n}\n.psc-mini-toggle {\n    border: 1px solid #cbd5e1;\n    border-radius: 4px;\n    padding: 2px 4px;\n    font-size: 11px;\n    background: #f8fafc;\n    color: #334155;\n    cursor: pointer;\n}\n.psc-currency-indicator {\n    font-size: 11px;\n    font-weight: 700;\n    background: #1ecad3;\n    color: white;\n    padding: 2px 6px;\n    border-radius: 4px;\n}\n.psc-result-value {\n    font-size: 22px;\n    font-weight: 700;\n    color: #0f172a;\n    word-break: break-all;\n}\n@keyframes pscFadeIn {\n    from { opacity: 0; transform: translateY(10px); }\n    to { opacity: 1; transform: translateY(0); }\n}\n<\/style>\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function() {\n    \/\/ UI field configurations matching prompt requested dimension patterns\n    const fieldConfigs = {\n        'Rectangle': [\n            { id: 'length', label: 'Length' },\n            { id: 'width', label: 'Width' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'L-shaped': [\n            { id: 'totalLength', label: 'Total Length' },\n            { id: 'totalWidth', label: 'Total Width' },\n            { id: 'shortSideLength', label: 'Short Side Length' },\n            { id: 'shortSideWidth', label: 'Short Side Width' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'Circle': [\n            { id: 'radius', label: 'Radius' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'Triangle': [\n            { id: 'baseLength', label: 'Base Length' },\n            { id: 'height', label: 'Height' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'Kidney': [\n            { id: 'length', label: 'Length' },\n            { id: 'width', label: 'Width' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'Oval': [\n            { id: 'length', label: 'Length (Major Axis)' },\n            { id: 'width', label: 'Width (Minor Axis)' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ],\n        'Oblong': [\n            { id: 'majorDia', label: 'Major Diameter' },\n            { id: 'minorDia', label: 'Minor Diameter' },\n            { id: 'length', label: 'Length' },\n            { id: 'shallowDepth', label: 'Shallow End Depth' },\n            { id: 'deepDepth', label: 'Deep End Depth' }\n        ]\n    };\n\n    let calculatedCubicMeters = 0; \n\n    function renderDynamicFields(shape, unitLabel) {\n        const container = document.getElementById('psc-dynamic-fields');\n        container.innerHTML = '';\n        const inputs = fieldConfigs[shape] || [];\n        \n        inputs.forEach(field => {\n            const wrapper = document.createElement('div');\n            wrapper.className = 'psc-input-wrapper';\n            \n            const label = document.createElement('label');\n            label.setAttribute('for', 'field-' + field.id);\n            label.innerText = field.label + ' (' + unitLabel + ')';\n            \n            const input = document.createElement('input');\n            input.type = 'number';\n            input.id = 'field-' + field.id;\n            input.className = 'psc-form-control';\n            input.min = '0';\n            input.step = 'any';\n            if (field.id.toLowerCase().includes('depth')) {\n                input.value = field.id.startsWith('shallow') ? '3' : '5';\n            } else {\n                input.value = '15';\n            }\n            \n            wrapper.appendChild(label);\n            wrapper.appendChild(input);\n            container.appendChild(wrapper);\n        });\n    }\n\n    function convertToMeters(value, currentUnit) {\n        const val = parseFloat(value) || 0;\n        switch (currentUnit) {\n            case 'in': return val * 0.0254;\n            case 'yd': return val * 0.9144;\n            case 'cm': return val * 0.01;\n            case 'm':  return val;\n            case 'ft':\n            default:   return val * 0.3048;\n        }\n    }\n\n    function calculatePoolVolumeInM3() {\n        const shape = document.getElementById('psc-selected-shape').value;\n        const unit = document.getElementById('psc-selected-unit').value;\n        \n        const getMetersValue = (id) => {\n            const el = document.getElementById('field-' + id);\n            return el ? convertToMeters(el.value, unit) : 0;\n        };\n\n        let surfaceAreaM2 = 0;\n        const shallowM = getMetersValue('shallowDepth');\n        const deepM = getMetersValue('deepDepth');\n        const avgDepthM = (shallowM + deepM) \/ 2;\n\n        switch (shape) {\n            case 'Rectangle': {\n                const len = getMetersValue('length');\n                const wid = getMetersValue('width');\n                surfaceAreaM2 = len * wid;\n                break;\n            }\n            case 'L-shaped': {\n                const totLen = getMetersValue('totalLength');\n                const totWid = getMetersValue('totalWidth');\n                const sLen = getMetersValue('shortSideLength');\n                const sWid = getMetersValue('shortSideWidth');\n                surfaceAreaM2 = (totLen * sWid) + ((totWid - sWid) * sLen);\n                break;\n            }\n            case 'Circle': {\n                const rad = getMetersValue('radius');\n                surfaceAreaM2 = Math.PI * Math.pow(rad, 2);\n                break;\n            }\n            case 'Triangle': {\n                const base = getMetersValue('baseLength');\n                const h = getMetersValue('height');\n                surfaceAreaM2 = 0.5 * base * h;\n                break;\n            }\n            case 'Kidney': {\n                const len = getMetersValue('length');\n                const wid = getMetersValue('width');\n                surfaceAreaM2 = len * wid * 0.45; \/\/ Industry standard mapping factor\n                break;\n            }\n            case 'Oval': {\n                const lenMajor = getMetersValue('length');\n                const widMinor = getMetersValue('width');\n                surfaceAreaM2 = Math.PI * (lenMajor \/ 2) * (widMinor \/ 2);\n                break;\n            }\n            case 'Oblong': {\n                const majDia = getMetersValue('majorDia');\n                const minDia = getMetersValue('minorDia');\n                const overallLen = getMetersValue('length');\n                const radius = minDia \/ 2;\n                const straightLength = Math.max(0, overallLen - minDia);\n                surfaceAreaM2 = (straightLength * minDia) + (Math.PI * Math.pow(radius, 2));\n                break;\n            }\n        }\n        return surfaceAreaM2 * avgDepthM;\n    }\n\n    function updateDisplayOutputs() {\n        if (calculatedCubicMeters <= 0) return;\n\n        \/\/ Volume conversion\n        const volUnit = document.getElementById('psc-volume-unit-toggle').value;\n        let volOutput = calculatedCubicMeters;\n        if (volUnit === 'gallons') volOutput = calculatedCubicMeters * 264.172;\n        else if (volUnit === 'liters') volOutput = calculatedCubicMeters * 1000;\n        document.getElementById('psc-output-volume').innerText = volOutput.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n\n        \/\/ Material weight (using dry masonry sand density factor ~1.6 metric tons per m3)\n        const structuralSandTonnes = calculatedCubicMeters * 1.6;\n        const weightUnit = document.getElementById('psc-weight-unit-toggle').value;\n        let weightOutput = structuralSandTonnes;\n        \n        if (weightUnit === 'kg') weightOutput = structuralSandTonnes * 1000;\n        else if (weightUnit === 'lbs') weightOutput = structuralSandTonnes * 2204.62;\n        document.getElementById('psc-output-weight').innerText = weightOutput.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n\n        \/\/ Cost estimation mapping\n        const currency = document.getElementById('psc-currency').value;\n        const pricePerTon = parseFloat(document.getElementById('psc-price-per-ton').value) || 0;\n        const totalCost = structuralSandTonnes * pricePerTon;\n\n        const symbols = { 'USD': '$', 'AUD': '$', 'EUR': '\u20ac' };\n        document.getElementById('psc-output-currency-label').innerText = currency;\n        document.getElementById('psc-output-cost').innerText = (symbols[currency] || '') + totalCost.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n    }\n\n    \/\/ Event listeners\n    document.querySelectorAll('.psc-shape-card').forEach(card => {\n        card.addEventListener('click', function() {\n            document.querySelectorAll('.psc-shape-card').forEach(c => c.classList.remove('active'));\n            this.classList.add('active');\n            const shape = this.getAttribute('data-shape');\n            document.getElementById('psc-selected-shape').value = shape;\n            renderDynamicFields(shape, document.getElementById('psc-selected-unit').value);\n        });\n    });\n\n    document.querySelectorAll('.psc-unit-btn').forEach(btn => {\n        btn.addEventListener('click', function() {\n            document.querySelectorAll('.psc-unit-btn').forEach(b => b.classList.remove('active'));\n            this.classList.add('active');\n            const unit = this.getAttribute('data-unit');\n            document.getElementById('psc-selected-unit').value = unit;\n            renderDynamicFields(document.getElementById('psc-selected-shape').value, unit);\n        });\n    });\n\n    document.querySelectorAll('.psc-reg-tab').forEach(tab => {\n        tab.addEventListener('click', function() {\n            document.querySelectorAll('.psc-reg-tab').forEach(t => t.classList.remove('active'));\n            document.querySelectorAll('.psc-reg-panel').forEach(p => p.classList.remove('active'));\n            this.classList.add('active');\n            document.getElementById('psc-reg-' + this.getAttribute('data-region')).classList.add('active');\n        });\n    });\n\n    document.getElementById('psc-calculate-btn').addEventListener('click', function() {\n        calculatedCubicMeters = calculatePoolVolumeInM3();\n        if (calculatedCubicMeters > 0) {\n            document.getElementById('psc-results-container').style.display = 'block';\n            updateDisplayOutputs();\n            document.getElementById('psc-results-container').scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n        }\n    });\n\n    document.getElementById('psc-volume-unit-toggle').addEventListener('change', updateDisplayOutputs);\n    document.getElementById('psc-weight-unit-toggle').addEventListener('change', updateDisplayOutputs);\n    document.getElementById('psc-currency').addEventListener('change', updateDisplayOutputs);\n    document.getElementById('psc-price-per-ton').addEventListener('input', updateDisplayOutputs);\n\n    \/\/ Initial setup\n    renderDynamicFields('Rectangle', 'ft');\n});\n<\/script>\n\n\n<!-- aiper-tool-links -->\n<div class=\"aiper-tool-links\">\n  <div class=\"aiper-tl-section\">\n    <div class=\"aiper-tl-heading\">More Tools<\/div>\n    <div class=\"aiper-tl-tags\">\n      <a href=\"https:\/\/aiper.com\/blogs\/pool-fill-time-calculator\/\" class=\"aiper-tl-tag\">Pool Fill Time Calculator<\/a>\n<a href=\"https:\/\/aiper.com\/blogs\/pool-turnover-rate-calculator\/\" class=\"aiper-tl-tag\">Pool Turnover Rate Calculator<\/a>\n<a href=\"https:\/\/aiper.com\/blogs\/pool-saturation-index-calculator\/\" class=\"aiper-tl-tag\">Pool Saturation Index Calculator<\/a>\n    <\/div>\n  <\/div>\n  <div class=\"aiper-tl-section\">\n    <div class=\"aiper-tl-heading\">Related Articles<\/div>\n    <div class=\"aiper-tl-tags\">\n      <a href=\"https:\/\/aiper.com\/blogs\/how-to-lower-alkalinity-in-pool\/\" class=\"aiper-tl-tag\">How to Lower Alkalinity in a Pool (and When You Actually Need To)<\/a>\n<a href=\"https:\/\/aiper.com\/blogs\/pool-robot-gets-stuck-on-main-drain\/\" class=\"aiper-tl-tag\">Why Does Your Pool Robot Get Stuck on the Main Drain?<\/a>\n<a href=\"https:\/\/aiper.com\/blogs\/how-to-winterize-inground-pool\/\" class=\"aiper-tl-tag\">How to Winterize an Inground Pool: Step-by-Step<\/a>\n<a href=\"https:\/\/aiper.com\/blogs\/how-to-get-rid-of-algae-in-pool\/\" class=\"aiper-tl-tag\">The Complete Guide to Pool Algae: How to Identify, Treat, and Prevent Every Type<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n<style>\n.aiper-tool-links{margin:2.5rem 0 1.5rem;padding:1.5rem 1.75rem;background:linear-gradient(135deg,rgba(148,134,247,.04),rgba(30,202,211,.04));border-radius:12px;border:1px solid rgba(148,134,247,.10)}\n.aiper-tl-section{margin-bottom:1.25rem}\n.aiper-tl-section:last-child{margin-bottom:0}\n.aiper-tl-heading{font-size:.75rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:#8899aa;margin:0 0 .65rem}\n.aiper-tl-tags{display:flex;flex-wrap:wrap;gap:.5rem}\n.aiper-tl-tag{display:inline-block;padding:.4rem .95rem;font-size:.82rem;font-weight:500;line-height:1.35;color:#9486f7;background:rgba(148,134,247,.055);border:1px solid rgba(30,202,211,.25);border-radius:22px;text-decoration:none;transition:all .18s}\n.aiper-tl-tag:hover{background:#1ecad3;color:#fff;border-color:#1ecad3;box-shadow:0 2px 10px rgba(30,202,211,.22)}\n<\/style>","protected":false},"excerpt":{"rendered":"<p>Pool Sand Calculator Accurately estimate the volume, weight, and total cost of sand required for your pool installation or base layer. 1 Select Pool Shape Rectangle L-Shaped Circle Triangle Kidney Oval Oblong 2 Measurement Unit Feet (ft) Inches (in) Yards (yd) Centimeters (cm) Meters (m) 3 Enter Pool Size Dimensions 4 Pricing &#038; Currency Currency&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-1818","page","type-page","status-publish","hentry"],"lang":"en","translations":{"en":1818,"de":2124,"fr":2125,"es":2126},"_links":{"self":[{"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/pages\/1818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/comments?post=1818"}],"version-history":[{"count":4,"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/pages\/1818\/revisions"}],"predecessor-version":[{"id":4286,"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/pages\/1818\/revisions\/4286"}],"wp:attachment":[{"href":"https:\/\/aiper.com\/blogs\/wp-json\/wp\/v2\/media?parent=1818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}