Logo

AAC Block Estimator

Precision material planning | Lightweight construction | Cost efficient

Outer Wall Calculator

Wall Dimensions
Windows
Doors
Block Size Selection
Outer Wall Results
Net Wall Area
0
sq ft
Total Blocks
0
pieces
Total Volume
0
Total Cubic Meter

Inner Wall Calculator

Wall Dimensions
Windows
Doors
Block Size Selection
Inner Wall Results
Net Wall Area
0
sq ft
Total Blocks
0
pieces
Total Volume
0
Total cubic meter

GRAND TOTAL SUMMARY

0
Total Wall Area (sq ft)
0
Total Blocks (pieces)
0
Total Volume (Total cubic meter)

Complete House Material Estimation

Detailed calculation based on individual room dimensions. Wall thickness is automatically derived from selected block sizes.


Rooms Configuration

Total Wall Area
0
sq ft
Total Blocks
0
pieces
Total Volume
0.00
Total cubic meter
Outer Blocks
0
pieces
Inner Blocks
0
pieces
Total Blocks (with wastage)
0
pieces
Total Volume (with wastage)
0.00
Total cubic meter
'); printWindow.document.close(); printWindow.print(); } function printHousePDF() { const printWindow = window.open('', '_blank'); printWindow.document.write('AAC Block House Report

House Report

'); printWindow.document.close(); printWindow.print(); } function checkAndShowPdfButtons() { const standardTotalBlocks = parseInt(document.getElementById('grandTotalBlocks')?.innerText) || 0; const standardPdfBtn = document.getElementById('standardPdfBtn'); if (standardTotalBlocks > 0 && standardPdfBtn) standardPdfBtn.style.display = 'block'; else if (standardPdfBtn) standardPdfBtn.style.display = 'none'; const houseTotalBlocks = parseInt(document.getElementById('houseTotalBlocks')?.innerText) || 0; const housePdfBtn = document.getElementById('housePdfBtn'); if (houseTotalBlocks > 0 && housePdfBtn) housePdfBtn.style.display = 'block'; else if (housePdfBtn) housePdfBtn.style.display = 'none'; } // Helper function to get Pieces per Cubic Meter for a given block size function getPiecesPerCubicMeter(blockSize) { // Map for Metric (mm) block sizes - Pieces per Cubic Meter const metricMap = { // 600mm x 250mm Series '600|250|75': 88.88, '600|250|100': 66.66, '600|250|125': 53.33, '600|250|150': 44.44, '600|250|200': 33.33, '600|250|250': 26.66, // 600mm x 200mm Series '600|200|75': 111.11, '600|200|100': 83.33, '600|200|125': 66.66, '600|200|150': 55.55, '600|200|200': 41.66, '600|200|250': 33.33, // 625mm x 250mm Series '625|250|75': 85.33, '625|250|100': 64.00, '625|250|125': 51.20, '625|250|150': 42.60, '625|250|200': 32.00, '625|250|250': 25.60, // 625mm x 200mm Series '625|200|75': 106.67, '625|200|100': 80.00, '625|200|125': 64.00, '625|200|150': 53.33, '625|200|200': 40.00, '625|200|250': 32.00 }; return metricMap[blockSize] || 0; } // Helper function to calculate blocks and volume from block size function calculateBlockResults(netArea, blockSize) { if (!blockSize || netArea <= 0) { return { blocks: 0, volume: 0 }; } const [lengthMm, heightMm, thicknessMm] = blockSize.split('|').map(Number); // Convert mm to feet (1 ft = 304.8 mm) const lengthFt = lengthMm / 304.8; const heightFt = heightMm / 304.8; const blockAreaSqFt = parseFloat((lengthFt * heightFt).toFixed(2)); const blocks = Math.ceil(netArea / blockAreaSqFt); // Calculate Total Cubic Meter = blocks / pieces per cubic meter const piecesPerCubicMeter = getPiecesPerCubicMeter(blockSize); let volume = 0; if (piecesPerCubicMeter > 0) { volume = blocks / piecesPerCubicMeter; } return { blocks: blocks, volume: volume }; } // Standard Tab Functions function addOuterWall() { outerWallCount++; const container = document.getElementById('outerWallsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeOuterWall(btn) { if (document.querySelectorAll('#outerWallsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function addOuterWindow() { outerWindowCount++; const container = document.getElementById('outerWindowsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeOuterWindow(btn) { if (document.querySelectorAll('#outerWindowsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function addOuterDoor() { outerDoorCount++; const container = document.getElementById('outerDoorsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeOuterDoor(btn) { if (document.querySelectorAll('#outerDoorsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function addInnerWall() { innerWallCount++; const container = document.getElementById('innerWallsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeInnerWall(btn) { if (document.querySelectorAll('#innerWallsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function addInnerWindow() { innerWindowCount++; const container = document.getElementById('innerWindowsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeInnerWindow(btn) { if (document.querySelectorAll('#innerWindowsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function addInnerDoor() { innerDoorCount++; const container = document.getElementById('innerDoorsContainer'); const div = document.createElement('div'); div.className = 'item-row'; div.innerHTML = `
`; container.appendChild(div); } function removeInnerDoor(btn) { if (document.querySelectorAll('#innerDoorsContainer .item-row').length > 1) { $(btn).closest('.item-row').remove(); calculateStandard(); } } function calculateStandard() { // Outer Wall Calculations let outerTotalArea = 0; document.querySelectorAll('#outerWallsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.outer-wall-length')?.value) || 0; const ht = parseFloat(item.querySelector('.outer-wall-height')?.value) || 0; outerTotalArea += len * ht; }); let outerWindowArea = 0; document.querySelectorAll('#outerWindowsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.outer-window-length')?.value) || 0; const ht = parseFloat(item.querySelector('.outer-window-height')?.value) || 0; outerWindowArea += len * ht; }); let outerDoorArea = 0; document.querySelectorAll('#outerDoorsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.outer-door-length')?.value) || 0; const ht = parseFloat(item.querySelector('.outer-door-height')?.value) || 0; outerDoorArea += len * ht; }); const outerNetArea = Math.max(0, outerTotalArea - outerWindowArea - outerDoorArea); document.getElementById('outerNetArea').innerText = outerNetArea.toFixed(2); // Inner Wall Calculations let innerTotalArea = 0; document.querySelectorAll('#innerWallsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.inner-wall-length')?.value) || 0; const ht = parseFloat(item.querySelector('.inner-wall-height')?.value) || 0; innerTotalArea += len * ht; }); let innerWindowArea = 0; document.querySelectorAll('#innerWindowsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.inner-window-length')?.value) || 0; const ht = parseFloat(item.querySelector('.inner-window-height')?.value) || 0; innerWindowArea += len * ht; }); let innerDoorArea = 0; document.querySelectorAll('#innerDoorsContainer .item-row').forEach(item => { const len = parseFloat(item.querySelector('.inner-door-length')?.value) || 0; const ht = parseFloat(item.querySelector('.inner-door-height')?.value) || 0; innerDoorArea += len * ht; }); const innerNetArea = Math.max(0, innerTotalArea - innerWindowArea - innerDoorArea); document.getElementById('innerNetArea').innerText = innerNetArea.toFixed(2); // Outer Block Calculation - Using new logic const outerBlockSize = document.getElementById('outerBlockSize').value; let outerResult = calculateBlockResults(outerNetArea, outerBlockSize); document.getElementById('outerTotalBlocks').innerText = outerResult.blocks; document.getElementById('outerTotalVolume').innerText = outerResult.volume.toFixed(2); // Inner Block Calculation - Using new logic const innerBlockSize = document.getElementById('innerBlockSize').value; let innerResult = calculateBlockResults(innerNetArea, innerBlockSize); document.getElementById('innerTotalBlocks').innerText = innerResult.blocks; document.getElementById('innerTotalVolume').innerText = innerResult.volume.toFixed(2); // Grand Total document.getElementById('grandTotalArea').innerText = (outerNetArea + innerNetArea).toFixed(2); document.getElementById('grandTotalBlocks').innerText = outerResult.blocks + innerResult.blocks; document.getElementById('grandTotalVolume').innerText = (outerResult.volume + innerResult.volume).toFixed(2); checkAndShowPdfButtons(); } // House Tab Functions - Updated to use thickness from block selections function addRoom() { rooms.push({ id: Date.now(), name: `Room ${rooms.length + 1}`, length: "", width: "", doors: [{ id: Date.now()+1, length: "", height: "", quantity: 1 }], windows: [{ id: Date.now()+2, length: "", height: "", quantity: 1 }] }); renderRooms(); calculateHouse(); } function removeRoom(roomId) { rooms = rooms.filter(r => r.id !== roomId); renderRooms(); calculateHouse(); } function addDoor(roomId) { const room = rooms.find(r => r.id === roomId); if (room) { room.doors.push({ id: Date.now(), length: "", height: "", quantity: 1 }); renderRooms(); calculateHouse(); } } function removeDoor(roomId, doorId) { const room = rooms.find(r => r.id === roomId); if (room) { room.doors = room.doors.filter(d => d.id !== doorId); renderRooms(); calculateHouse(); } } function addWindow(roomId) { const room = rooms.find(r => r.id === roomId); if (room) { room.windows.push({ id: Date.now(), length: "", height: "", quantity: 1 }); renderRooms(); calculateHouse(); } } function removeWindow(roomId, windowId) { const room = rooms.find(r => r.id === roomId); if (room) { room.windows = room.windows.filter(w => w.id !== windowId); renderRooms(); calculateHouse(); } } function updateDoorField(roomId, doorId, field, value) { const room = rooms.find(r => r.id === roomId); if (room) { const door = room.doors.find(d => d.id === doorId); if (door) { door[field] = field === 'quantity' ? (parseInt(value) || 1) : (parseFloat(value) || 0); calculateHouse(); } } } function updateWindowField(roomId, windowId, field, value) { const room = rooms.find(r => r.id === roomId); if (room) { const window = room.windows.find(w => w.id === windowId); if (window) { window[field] = field === 'quantity' ? (parseInt(value) || 1) : (parseFloat(value) || 0); calculateHouse(); } } } function updateRoomField(roomId, field, value) { const room = rooms.find(r => r.id === roomId); if (room) { room[field] = parseFloat(value) || 0; calculateHouse(); } } function renderRooms() { const container = document.getElementById('roomsContainer'); container.innerHTML = ''; if (rooms.length === 0) { container.innerHTML = '
Click "Add More Room" to start adding rooms
'; return; } rooms.forEach(room => { const roomDiv = document.createElement('div'); roomDiv.className = 'room-card'; roomDiv.innerHTML = `
${room.name}
${room.doors.map((door, idx) => `
`).join('')}
${room.windows.map((window, idx) => `
`).join('')}
`; container.appendChild(roomDiv); }); } function calculateHouse() { let floorArea = parseFloat(document.getElementById('houseFloorArea').value) || 0; let deduction = (parseFloat(document.getElementById('houseDeduction').value) || 15) / 100; let wastage = (parseFloat(document.getElementById('houseWastage').value) || 5) / 100; let outerBlockVal = document.getElementById('houseOuterBlock').value; let innerBlockVal = document.getElementById('houseInnerBlock').value; // Extract thickness from block selections (third value) let extThickMm = 0, intThickMm = 0; if (outerBlockVal) { const parts = outerBlockVal.split('|'); extThickMm = parseFloat(parts[2]) || 0; // thickness in inches } if (innerBlockVal) { const parts = innerBlockVal.split('|'); intThickMm = parseFloat(parts[2]) || 0; } // If thickness not set, use defaults (but warn) if (extThickMm === 0) extThickMm = 6; if (intThickMm === 0) intThickMm = 4; let wallHeight = 10; let perimeter = Math.sqrt(floorArea) * 4; let totalWallArea = perimeter * wallHeight; let totalDoorsArea = 0, totalWindowsArea = 0; rooms.forEach(room => { room.doors.forEach(door => totalDoorsArea += (door.length * door.height) * door.quantity); room.windows.forEach(window => totalWindowsArea += (window.length * window.height) * window.quantity); }); let totalOpeningsArea = totalDoorsArea + totalWindowsArea; let netWallArea = Math.max(0, totalWallArea - totalOpeningsArea) * (1 - deduction); let extArea = netWallArea * 0.7, intArea = netWallArea * 0.3; // Convert thickness from inches to meters for volume calculation let extThickM = extThickMm / 39.37; // inches to meters let intThickM = intThickMm / 39.37; let extVol = extArea * extThickM; let intVol = intArea * intThickM; let totalVol = extVol + intVol; // Parse block dimensions for count calculation let extLenM = 0, extHtM = 0, intLenM = 0, intHtM = 0; if (outerBlockVal) { const [lenInch, htInch] = outerBlockVal.split('|').map(Number); extLenM = lenInch / 39.37; extHtM = htInch / 39.37; } if (innerBlockVal) { const [lenInch, htInch] = innerBlockVal.split('|').map(Number); intLenM = lenInch / 39.37; intHtM = htInch / 39.37; } let extBlockVol = extLenM * extHtM * extThickM; let intBlockVol = intLenM * intHtM * intThickM; let extBlocks = (extBlockVol > 0 && extVol > 0) ? Math.ceil(extVol / extBlockVol) : 0; let intBlocks = (intBlockVol > 0 && intVol > 0) ? Math.ceil(intVol / intBlockVol) : 0; let totalBlocks = extBlocks + intBlocks; let finalBlocks = Math.ceil(totalBlocks * (1 + wastage)); let finalVolume = totalVol * (1 + wastage); document.getElementById('houseTotalArea').innerText = netWallArea.toFixed(0); document.getElementById('houseTotalBlocks').innerText = totalBlocks; document.getElementById('houseTotalVolume').innerText = totalVol.toFixed(2); document.getElementById('houseOuterBlocks').innerText = extBlocks; document.getElementById('houseInnerBlocks').innerText = intBlocks; document.getElementById('houseFinalBlocks').innerText = finalBlocks; document.getElementById('houseFinalVolume').innerText = finalVolume.toFixed(2); checkAndShowPdfButtons(); } // Initialize document.addEventListener('DOMContentLoaded', function() { addRoom(); document.querySelectorAll('#standard input, #standard select').forEach(el => { el.addEventListener('input', calculateStandard); el.addEventListener('change', calculateStandard); }); document.querySelectorAll('#house input, #house select').forEach(el => { el.addEventListener('input', calculateHouse); el.addEventListener('change', calculateHouse); }); calculateStandard(); calculateHouse(); });