';
h += P2.subHTML([[R.bags.b80,'x 80 lb'],[R.bags.b60,'x 60 lb'],[R.bags.b50,'x 50 lb'],[R.bags.b40,'x 40 lb'],[R.bagsM.k25,'x 25 kg'],[R.bagsM.k20,'x 20 kg']]);
var lU = units.l || 'ft', wU = units.w || 'ft', tU = units.t || 'in';
var workTxt = P2.esc(String(vals.l))+' '+P2.esc(lU)+' x '+P2.esc(String(vals.w))+' '+P2.esc(wU)
+' x ('+P2.esc(String(vals.t))+' '+P2.esc(tU)+' / 12) = '+P2.fmt(R.netFt3,1)+' ft3'
+', / 27 = '+P2.fmt(R.netYd3)+' yd3'
+(waste>0 ? ', x '+(1+waste/100).toFixed(2)+' waste = '+P2.fmt(R.wasteYd3)+' yd3' : '');
h += P2.workingHTML(workTxt);
h += P2.noteHTML('Estimates only. Bag yields per manufacturer specs (80 lb = 0.60 ft3, 60 lb = 0.45 ft3, 40 lb = 0.30 ft3). Subgrade prep matters as much as thickness: compact the base, plan control joints and confirm the final order with your supplier.');
h += P2.actionsHTML('driveway')+'
';
if(R.cost > 0) h += P2.subHTML([[P2.CUR + P2.fmt(R.cost), 'estimated material cost']]);
var work = lenExpr(vals.l, units.l) + ' x ' + lenExpr(vals.w, units.w) + ' x ' + depthExpr(vals.d, units.d)
+ ' = ' + P2.fmt(R.compactedFt3, 1) + ' ft3 compacted = ' + P2.fmt(R.compactedYd3) + ' yd3.'
+ ' Loose order = ' + P2.fmt(R.compactedFt3, 1) + ' x ' + P2.fmt(imp.factor, 2)
+ ' = ' + P2.fmt(R.looseFt3, 1) + ' ft3 = ' + P2.fmt(R.looseYd3) + ' yd3'
+ ' (' + P2.fmt(R.looseM3) + ' m3).'
+ ' Weight = ' + P2.fmt(R.looseM3) + ' m3 x ' + P2.fmt(imp.density, 1)
+ ' t/m3 (' + matName + ') = ' + P2.fmt(R.tonnes, 2) + ' tonnes.'
+ ' Bulk bags = ' + P2.fmt(R.kg, 0) + ' / ' + P2.fmt(imp.bagKg, 0)
+ ' = ' + R.bulkBags + ' bags.';
h += P2.workingHTML(work);
h += P2.noteHTML('Estimates only. The 1.30 compaction allowance is a standard estimating allowance for mixed gravel and base material; clean single-size stone compacts less, so adjust the allowance to about 1.15 if that is what you are ordering. Confirm tonnage and bag weights with your supplier.');
h += P2.actionsHTML('gravel') + '
';
var summary = 'Gravel: compacted ' + P2.fmt(R.compactedYd3) + ' yd3, order ' + P2.fmt(R.looseYd3)
+ ' yd3 loose (' + P2.fmt(R.tonnes, 2) + ' tonnes, ' + R.bulkBags + ' bulk bags). via concretequantity.com/gravel-calculator/';
return {html: h, summary: summary};
},
verified: 'Compaction allowance 1.30 as a standard estimating allowance for mixed base material. Bulk densities: decorative gravel 1.5 t/m3, single-size stone 1.6 t/m3, MOT Type 1 / crushed sub-base 1.9 t/m3 (compacted). UK bulk bag 850 kg.',
links: ['driveway', 'slab', 'cost', 'curb', 'readymix', 'circle', 'footing', 'rebar']
});
})();
(function(){
"use strict";
P2.calcBlocks = function(o){
var area = o.l * o.h;
var blocksNet = P2.ceilSafe(area * 1.125);
var w = 1 + (o.waste||0)/100;
var blocksWaste = P2.ceilSafe(blocksNet * w);
var mortarBags = P2.ceilSafe(blocksWaste / 13);
var groutFt3 = (o.groutEvery > 0) ? (blocksNet * 0.321 / o.groutEvery) : 0;
var groutBags = P2.ceilSafe(groutFt3 / 0.60);
return {
area: area,
blocksNet: blocksNet,
blocksWaste: blocksWaste,
courses: Math.ceil(o.h*12/8),
blocksPerCourse: P2.ceilSafe(o.l*12/16),
mortarBags: mortarBags,
mortarFt3: mortarBags*0.66,
groutFt3: groutFt3,
groutYd3: groutFt3/27,
groutBags: groutBags
};
};
function blocksSVG(live){
var bx = 10, by = 15, bw = 20, ch = 12, cols = 6, rows = 4;
var fill = '#eef4ff', stroke = '#2563eb';
var h = '';
return h;
}
P2.register({
id: 'blocks',
tab: 'Block Wall',
title: 'Block Wall Calculator (US and UK blocks)',
formula: 'US: Blocks = wall area x 1.125 per ft2 (8x8x16 with 3/8 in joints). UK: Blocks = wall area x 9.9 per m2 (440x215 mm with 10 mm joints).',
diagram: blocksSVG,
fields: [
{id:'l', label:'Wall length', kind:'len', ph:'20', defUnit:'ft'},
{id:'h', label:'Wall height', kind:'len', ph:'4', defUnit:'ft'}
],
extrasHTML: function(){
return P2.wasteRowHTML(10)
+ '
'
+ '
'
+ '
'
+ '
';
},
toImp: function(vals, units){
return { l: P2.toFt(vals.l, units.l), h: P2.toFt(vals.h, units.h) };
},
render: function(imp, vals, units, panel){
var waste = P2.readWaste(panel);
var gsel = panel.querySelector('.groutSel');
var groutEvery = gsel ? parseInt(gsel.value, 10) : 1;
var btsel = panel.querySelector('.blockTypeSel');
var isUK = btsel && btsel.value === 'uk';
var R;
if(isUK){
var lM = imp.l * 0.3048, hM = imp.h * 0.3048;
var areaM2 = lM * hM;
var blocksNetUK = P2.ceilSafe(areaM2 * 9.9);
var wUK = 1 + (waste||0)/100;
var blocksWasteUK = P2.ceilSafe(blocksNetUK * wUK);
R = { area: areaM2, areaUnit: 'm2', blocksNet: blocksNetUK, blocksWaste: blocksWasteUK,
courses: Math.ceil(hM*1000/225), blocksPerCourse: P2.ceilSafe(lM*1000/450),
mortarBags: null, mortarFt3: null, groutFt3: 0, groutYd3: 0, groutBags: 0, isUK: true };
} else {
R = P2.calcBlocks({l: imp.l, h: imp.h, waste: waste, groutEvery: groutEvery});
R.isUK = false; R.areaUnit = 'ft2';
}
var h = '
Block wall materials
';
var cards = [
{icon:'wall', big:R.blocksWaste, lbl:'Blocks (with '+waste+'% waste)'}
];
if(R.mortarBags !== null){
cards.push({icon:'bags', big:R.mortarBags, lbl:'Mortar Bags (80 lb)'});
} else {
cards.push({icon:'bags', big:'--', lbl:'Mortar: see supplier'});
}
cards.push({icon:'cube', big:P2.fmt(R.groutYd3), lbl:'Grout (Cubic Yards)'});
h += P2.cardsHTML(cards);
var subs = [
[R.blocksNet, 'blocks net'],
[R.courses, 'courses'],
[R.blocksPerCourse, 'blocks per course']
];
if(R.mortarBags !== null){
subs.push([P2.fmt(R.mortarFt3, 2), 'ft3 mortar']);
}
subs.push([R.groutBags, 'x 80 lb bags for grout']);
h += P2.subHTML(subs);
var areaTxt = isUK ? P2.fmt(R.area, 2) + ' m2' : P2.fmt(R.area, 1) + ' ft2';
var work = 'Wall area = ' + P2.fmt(imp.l, 1) + ' x ' + P2.fmt(imp.h, 1)
+ ' = ' + areaTxt + '. ';
if(isUK){
work += 'Blocks = ' + P2.fmt(R.area, 2) + ' x 9.9 = ' + R.blocksNet + ' (UK 440 x 215 mm blocks, about 10 per m2); '
+ 'with ' + waste + '% waste = ' + R.blocksWaste + '. '
+ 'Mortar coverage for UK blocks varies by supplier; confirm bag counts with your merchant.';
} else {
work += 'Blocks = ' + P2.fmt(R.area, 1) + ' x 1.125 = ' + R.blocksNet + '; '
+ 'with ' + waste + '% waste = ' + R.blocksWaste + '. '
+ 'Mortar = ' + R.blocksWaste + ' / 13 = ' + R.mortarBags + ' bags (80 lb).';
}
if(groutEvery > 0 && !isUK){
work += ' Grout = ' + R.blocksNet + ' x 0.321 = ' + P2.fmt(R.groutFt3, 1) + ' ft3'
+ ' = ' + P2.fmt(R.groutYd3) + ' yd3'
+ ' = ' + R.groutBags + ' bags (80 lb).';
} else if(isUK){
work += ' Grout not calculated for UK blocks.';
} else {
work += ' No grout selected.';
}
h += P2.workingHTML(work);
h += P2.noteHTML('Material estimate only, not structural design. Retaining walls, walls carrying loads, and any wall needing lintels or reinforcement design should be checked by a qualified professional. Grout assumes standard 8x8x16 hollow blocks. Confirm quantities with your supplier.');
h += P2.actionsHTML('blocks') + '
';
var summary = 'Block wall: ' + R.blocksWaste + ' blocks'
+ (R.mortarBags !== null ? ', ' + R.mortarBags + ' mortar bags' : ', mortar see supplier')
+ ', ' + P2.fmt(R.groutYd3) + ' yd3 grout. via concretequantity.com/block-wall-calculator/';
return {html: h, summary: summary};
},
verified: 'Block coverage 1.125 per ft2 for 8x8x16 CMU with 3/8 in joints; UK 440x215 mm blocks about 9.9 per m2 (10 per m2). Mortar coverage 13 blocks per 80 lb bag per Quikrete Mason Mix #1136 data sheet. Grout 36.1 ft3 per 100 ft2 per CMHA TEK 09-04A (0.321 ft3 per block).',
links: ['wall', 'mortar', 'cost', 'slab', 'readymix', 'footing', 'rebar', 'curb']
});
})();
(function(){
"use strict";
P2.calcMortar = function(o){
var per = (o.type === 'block') ? 13 : 37;
var w = 1 + (o.waste||0)/100;
var bags = P2.ceilSafe(o.n / per * w);
return { perBag: per, bags: bags, ft3: bags*0.66, cost: (o.priceBag||0) > 0 ? bags*(o.priceBag||0) : 0 };
};
function mortarSVG(live){
var h = '';
return h;
}
P2.register({
id:'mortar', tab:'Mortar', title:'Mortar Calculator for Block and Brick',
formula:'Bags = units / coverage per bag (13 blocks or 37 bricks per 80 lb bag)',
diagram: mortarSVG,
fields:[ {id:'n',label:'Number of units',kind:'num',ph:'90'} ],
extrasHTML:function(){
return '
'
+ P2.wasteRowHTML(10)
+ P2.priceFieldHTML('priceBag','Price per 80 lb bag','8','optional');
},
extraFields:[ {id:'priceBag',label:'Price per bag',kind:'usd',optional:true} ],
empty:'Enter the number of blocks or bricks above.',
toImp:function(vals,units){ return { n:P2.num(vals.n)||0, priceBag:P2.num(vals.priceBag) }; },
render:function(imp, vals, units, panel){
var waste = P2.readWaste(panel);
var msel = panel.querySelector('.mtypeSel');
var type = msel ? msel.value : 'block';
var R = P2.calcMortar({n:imp.n, type:type, waste:waste, priceBag:imp.priceBag});
var unitName = (type==='ukbrick') ? 'UK bricks' : ((type==='brick') ? 'bricks' : 'blocks');
var h = '
Mortar needed
';
h += P2.cardsHTML([
{icon:'bags', big:R.bags, lbl:'Bags (80 lb)'},
{icon:'cube', big:P2.fmt(R.ft3,2), lbl:'Cubic Feet of Mortar'},
{icon:'wall', big:P2.fmt(imp.n,0), lbl:unitName.charAt(0).toUpperCase()+unitName.slice(1)}
]);
if(R.cost>0) h += P2.subHTML([[P2.CUR+P2.fmt(R.cost),'estimated mortar cost']]);
var work = P2.fmt(imp.n,0)+' '+unitName+' / '+R.perBag+' per bag = '+P2.fmt(imp.n/R.perBag,2);
if(waste>0) work += ', with '+P2.fmt(waste,0)+'% waste';
work += ' = '+R.bags+' bags (80 lb). Mortar volume = '+R.bags+' x 0.66 = '+P2.fmt(R.ft3,2)+' ft3';
h += P2.workingHTML(work);
h += P2.noteHTML('Estimates only. Manufacturer coverage ("up to 13 blocks" per Quikrete) assumes tidy joints; real-world use is often higher, so the waste margin matters. Confirm bag counts with your supplier.');
h += P2.actionsHTML('mortar')+'
';
var summary = 'Mortar for '+P2.fmt(imp.n,0)+' '+unitName+': '+R.bags+' bags (80 lb), '+P2.fmt(R.ft3,2)+' ft3. via concretequantity.com/mortar-calculator/';
return {html:h, summary:summary};
},
verified:'Coverage of 13 blocks or 37 bricks per 80 lb bag per Quikrete Mason Mix #1136 data sheet ("up to" figures; allow a 10-15% waste margin). UK standard brick 215 x 102.5 x 65 mm: about 60 per m2 for a half-brick wall.',
links:['blocks','wall','cost','slab','readymix','footing','curb','rebar']
});
})();
(function(){
"use strict";
P2.calcReadymix = function(o){
var vol = o.yd3 * (1 + (o.waste||0)/100);
var shortApplies = vol < (o.shortMin||0) && (o.shortFee||0) > 0;
var ready = vol*(o.priceYd3||0) + (o.delivery||0) + (shortApplies ? (o.shortFee||0) : 0);
var bags = P2.ceilSafe(vol*27 / 0.60);
var bagTotal = bags*(o.bagPrice||0);
return {
vol: vol,
readyTotal: ready, readyPerYd3: vol>0 ? ready/vol : 0,
shortApplies: shortApplies,
bags: bags, bagTotal: bagTotal, bagPerYd3: vol>0 ? bagTotal/vol : 0,
trucks: P2.ceilSafe(vol/10),
winner: (ready < bagTotal) ? 'readymix' : ((bagTotal < ready) ? 'bags' : 'tie'),
saving: Math.abs(ready - bagTotal)
};
};
function readymixSVG(live){
return '';
}
P2.register({
id:'readymix', tab:'Ready Mix vs Bags', title:'Ready Mix vs Bags Cost Calculator',
formula:'Ready mix = volume x price + delivery (+ short load fee). Bags = ceil(volume / 0.60) x bag price.',
diagram: readymixSVG,
fields:[ {id:'y',label:'Concrete needed',kind:'yd3',ph:'3',defUnit:'yd3'} ],
extrasHTML:function(){
return P2.wasteRowHTML(10)
+ P2.priceFieldHTML('priceYd3','Ready mix price per yd3','150','')
+ P2.priceFieldHTML('delivery','Delivery fee','150','optional')
+ P2.priceFieldHTML('shortFee','Short load fee','90','optional')
+ '
yd3
'
+ P2.priceFieldHTML('bagPrice','Price per 80 lb bag','6','')
+ P2.priceFieldHTML('mixerHire','Mixer hire (optional)','60','optional');
},
extraFields:[ {id:'priceYd3',label:'Ready mix price',kind:'usd',optional:true},
{id:'delivery',label:'Delivery fee',kind:'usd',optional:true},
{id:'shortFee',label:'Short load fee',kind:'usd',optional:true},
{id:'shortMin',label:'Short load minimum',kind:'num',optional:true},
{id:'bagPrice',label:'Bag price',kind:'usd',optional:true},
{id:'mixerHire',label:'Mixer hire',kind:'usd',optional:true} ],
empty:'Enter the concrete volume above.',
toImp:function(vals,units){
var u = units.y || 'yd3', yv = parseFloat(vals.y)||0, yd3v;
if(u==='m3') yd3v = yv*1.30795; else if(u==='ft3') yd3v = yv/27; else yd3v = yv;
var sm = parseFloat(vals.shortMin); if(!isFinite(sm)||sm<0) sm = 3;
function dp(v, d){ v = parseFloat(v); return isFinite(v) ? v : d; }
return { yd3:yd3v, priceYd3:dp(vals.priceYd3,150), delivery:dp(vals.delivery,150),
shortFee:dp(vals.shortFee,90), shortMin:sm, bagPrice:dp(vals.bagPrice,6),
mixerHire:dp(vals.mixerHire,0) };
},
render:function(imp, vals, units, panel){
var waste = P2.readWaste(panel);
var R = P2.calcReadymix({yd3:imp.yd3, waste:waste, priceYd3:imp.priceYd3, delivery:imp.delivery,
shortFee:imp.shortFee, shortMin:imp.shortMin, bagPrice:imp.bagPrice});
var winTxt = R.winner==='readymix' ? 'Ready mix is cheaper by '+P2.CUR+P2.fmt(R.saving)
: (R.winner==='bags' ? 'Bags are cheaper by '+P2.CUR+P2.fmt(R.saving) : 'Both options cost about the same');
var workReady = P2.fmt(R.vol)+' yd3 x '+P2.CUR+P2.fmt(imp.priceYd3)+' = '+P2.CUR+P2.fmt(R.vol*imp.priceYd3)
+' + '+P2.CUR+P2.fmt(imp.delivery)+' delivery'
+ (R.shortApplies ? ' + '+P2.CUR+P2.fmt(imp.shortFee)+' short load ('+P2.fmt(R.vol)+' yd3 is under the '+P2.fmt(imp.shortMin)+' yd3 minimum)' : '')
+' = '+P2.CUR+P2.fmt(R.readyTotal)+' ('+P2.CUR+P2.fmt(R.readyPerYd3)+' per yd3)';
var workBags = P2.fmt(R.vol)+' yd3 x 27 = '+P2.fmt(R.vol*27)+' ft3, / 0.60 = '+R.bags+' bags'
+' x '+P2.CUR+P2.fmt(imp.bagPrice)+' = '+P2.CUR+P2.fmt(R.bagTotal)+' ('+P2.CUR+P2.fmt(R.bagPerYd3)+' per yd3)';
var h = '
Cost comparison
';
h += '
';
h += P2.nwColHTML('Ready mix delivered',
[{icon:'truck',big:P2.CUR+P2.fmt(R.readyTotal),lbl:'Total'},{icon:'cube',big:P2.CUR+P2.fmt(R.readyPerYd3),lbl:'Per Cubic Yard'}],
[[R.trucks,'truck load'+(R.trucks===1?'':'s')+' (10 yd3 trucks)'],[R.shortApplies ? 'Short load fee applied' : 'No short load fee','']]);
h += P2.nwColHTML('Bagged concrete',
[{icon:'bags',big:P2.CUR+P2.fmt(R.bagTotal),lbl:'Total'},{icon:'cube',big:P2.CUR+P2.fmt(R.bagPerYd3),lbl:'Per Cubic Yard'}],
[[R.bags,'x 80 lb bags'],['Hand mixing labour not included','']]);
h += '
';
h += '
Verdict: '+winTxt+'.
';
h += P2.workingHTML('Ready mix: '+workReady+'. Bags: '+workBags+'.');
h += P2.noteHTML('Estimates only. Short-load fees (for example $90) usually apply to orders under about 3 cubic yards. UK barrel mixers carry 6 to 8 m3 per trip. Below about 1 cubic yard bags are usually cheaper; above about 2 cubic yards ready mix usually wins on price and always wins on labour. Hand mixing over 100 bags is a full day of hard labour. Get local quotes: prices vary widely.');
h += P2.actionsHTML('readymix')+'
';
var summary = 'Ready mix vs bags for '+P2.fmt(R.vol)+' yd3: ready mix '+P2.CUR+P2.fmt(R.readyTotal)+', bags '+P2.CUR+P2.fmt(R.bagTotal)+'. '+winTxt+'. via concretequantity.com/ready-mix-vs-bags-calculator/';
return {html:h, summary:summary};
},
verified:'US truck capacity 8 to 10 yd3. UK barrel mixers 6 and 8 m3. Short-load fees (for example $90) apply to orders under about 3 yd3. Bag yield 0.60 ft3 per 80 lb bag per Quikrete.',
links:['cost','bags','driveway','slab','gravel','curb','footing','stairs']
});
})();