'
+''
+ P5.relatedHTML(mode.links || [])
+ P5.verifiedHTML(mode.verified || '');
p.innerHTML = inner;
p.querySelectorAll('input,select').forEach(function(el){
el.addEventListener('input', function(){ P5.calcPanel(mode, p); P5.updatePreview(mode, p); });
el.addEventListener('change', function(){ P5.calcPanel(mode, p); P5.updatePreview(mode, p); });
});
p.querySelectorAll('select.cc-funit').forEach(function(sel){
sel.addEventListener('change', function(){
var fid = sel.getAttribute('data-funit');
var inp = p.querySelector('input[data-fid="'+fid+'"]');
if(!inp || !inp.value){ P5.calcPanel(mode, p); P5.updatePreview(mode, p); return; }
var field = null;
(mode.fields||[]).forEach(function(f){ if(f.id===fid) field=f; });
if(!field) return;
var oldU = sel.getAttribute('data-prev') || field.defUnit || 'ft';
var newU = sel.value;
if(oldU!==newU) inp.value = P5.convertVal(inp.value, oldU, newU, field.kind);
sel.setAttribute('data-prev', newU);
P5.calcPanel(mode, p); P5.updatePreview(mode, p);
});
sel.setAttribute('data-prev', sel.value);
});
/* Quick value buttons */
p.querySelectorAll('[data-quick]').forEach(function(b){
b.addEventListener('click', function(){
var fid = b.getAttribute('data-qfid');
var inp = p.querySelector('input[data-fid="'+fid+'"]');
var sel = p.querySelector('select.cc-funit[data-funit="'+fid+'"]');
if(inp){
var qv = b.getAttribute('data-quick');
if(sel && (sel.value==='m'||sel.value==='cm'||sel.value==='mm')){
var cm = parseFloat(qv)*2.54;
if(sel.value==='m') inp.value = P5.fmt(cm/100,3);
else if(sel.value==='cm') inp.value = P5.fmt(cm,1);
else inp.value = P5.fmt(cm*10,0);
} else {
inp.value = qv;
if(sel) sel.value='in';
}
p.querySelectorAll('[data-qfid="'+fid+'"]').forEach(function(x){ x.classList.remove('on'); });
b.classList.add('on');
P5.calcPanel(mode, p); P5.updatePreview(mode, p);
}
});
});
P5.calcPanel(mode, p);
P5.updatePreview(mode, p);
return p;
};
/* ============ 12. HEADER TOGGLES + BOOT ============ */
P5.wireHeader = function(){
var ui = document.getElementById('p5uImp'), um = document.getElementById('p5uMet'),
uc = document.getElementById('p5uCur');
function paint(){
if(ui) ui.classList.toggle('on', P5.UNITS==='imp');
if(um) um.classList.toggle('on', P5.UNITS==='met');
if(uc) uc.textContent = (P5.CUR==='£' ? '£ GBP' : (P5.CUR==='€' ? '€ EUR' : '$ USD'));
document.querySelectorAll('.p5CurSym').forEach(function(s){ s.textContent = P5.CUR; });
}
if(ui) ui.onclick = function(){
P5.UNITS='imp'; try{localStorage.setItem('cc_units','imp');}catch(e){}
document.querySelectorAll('.cc-funit').forEach(function(sel){
var fid = sel.getAttribute('data-funit');
var inp = document.querySelector('input[data-fid="'+fid+'"]');
var target = 'ft';
var inpKind = inp ? inp.getAttribute('data-kind') : 'len';
if(inpKind==='sm') target = 'in';
else if(inpKind==='yd3') target = 'yd3';
if(inp && inp.value){
var oldU = sel.value;
inp.value = P5.convertVal(inp.value, oldU, target, (target==='in'?'sm':'len'));
}
sel.value = target;
sel.setAttribute('data-prev', target);
});
paint(); P5.rerenderAll();
};
if(um) um.onclick = function(){
P5.UNITS='met'; try{localStorage.setItem('cc_units','met');}catch(e){}
document.querySelectorAll('.cc-funit').forEach(function(sel){
var fid = sel.getAttribute('data-funit');
var inp = document.querySelector('input[data-fid="'+fid+'"]');
var inpKind = inp ? inp.getAttribute('data-kind') : 'len';
var isSm = (inpKind==='sm');
var target = isSm ? 'cm' : 'm';
if(inpKind==='yd3') target = 'm3';
if(inp && inp.value){
inp.value = P5.convertVal(inp.value, sel.value, target, isSm?'sm':'len');
}
sel.value = target;
sel.setAttribute('data-prev', target);
});
paint(); P5.rerenderAll();
};
if(uc) uc.onclick = function(){
P5.CUR = (P5.CUR==='$') ? '£' : ((P5.CUR==='£') ? '€' : '$');
try{localStorage.setItem('cc_cur',P5.CUR);}catch(e){}
paint(); P5.rerenderAll();
};
paint();
};
P5.rerenderAll = function(){
Object.keys(P5._modes).forEach(function(id){
var panel = document.getElementById('p5p-'+id);
if(panel) { P5.calcPanel(P5._modes[id], panel); P5.updatePreview(P5._modes[id], panel); }
});
};
P5.boot = function(){
var id = window.CC_SINGLE;
var mode = P5._modes[id];
if(!mode) return;
var c = document.getElementById('ccSingle');
if(!c) return;
var p = P5.buildPanel(mode);
p.id = 'p5p-'+mode.id;
c.appendChild(p);
P5.wireHeader();
};
if(typeof document !== 'undefined'){
if(document.readyState === 'loading'){
document.addEventListener('DOMContentLoaded', P5.boot);
} else {
P5.boot();
}
}
})();
/* ============================================================
ConcreteQuantity Calculator: Phase 2 batch 4 chunk - Screed
ADDITIVE chunk. Registers the 'screed' mode with P5.
Does not touch V6, the batch 1 (P2) script, the batch 2 (P3)
script, the batch 3 (P4) script, or any existing tools.
Constants:
- Dry volume factor 1.33: wet screed volume x 1.33 gives the
dry materials volume (screed worked examples, 1:4 mix)
- Cement bulk density 1,440 kg/m3; sharp sand 1,600 kg/m3
(standard published bulk densities used by mix calculators)
- BS 8204-1 minimum thicknesses: bonded 25 mm, unbonded
50 mm, floating 65 mm (levelling screeds)
Note: this tool sizes a sand and cement levelling screed
(floor topping), not structural concrete. It is not a mortar
tool: mortar is for joints and brickwork, screed is a floor
layer laid over a slab or insulation.
============================================================ */
(function(){
"use strict";
P5.calcScreed = function(o){
// o: {areaM2, thickMm, ratio} ratio = sand parts per 1 cement.
// {waste} waste percent, {bagKg} cement bag size in kg.
var wet = (o.areaM2||0) * ((o.thickMm||0)/1000);
var orderWet = wet * (1 + (o.waste||0)/100);
var dry = orderWet * P5.SCREED_DRY_FACTOR;
var parts = 1 + (o.ratio||4);
var cementVol = dry / parts;
var cementKg = cementVol * P5.CEMENT_KG_M3;
var sandVol = dry * (o.ratio||4) / parts;
var sandTonnes = sandVol * P5.SAND_T_PER_M3;
var bagKg = o.bagKg || 25;
return {
areaM2: o.areaM2||0, thickMm: o.thickMm||0, wet: wet,
orderWet: orderWet, dry: dry, cementVol: cementVol,
cementKg: cementKg, bags: P5.ceilSafe(cementKg/bagKg),
sandVol: sandVol, sandTonnes: sandTonnes,
ft3: wet * P5.FT3_PER_M3, yd3: wet / P5.M3_PER_YD3,
orderFt3: orderWet * P5.FT3_PER_M3, orderYd3: orderWet / P5.M3_PER_YD3
};
};
function screedSVG(live){
function t(fid, fb){
var e = live[fid];
if(e && e.val !== '') return P5.esc(String(e.val)+' '+(e.unit||''));
return fb;
}
var h = '';
return h;
}
P5.register({
id:'screed', tab:'Screed', title:'Floor Screed Calculator',
formula:'Wet volume = Area x Thickness; dry volume = wet x 1.33; cement = dry / (1 + sand parts)',
diagram: screedSVG,
fields:[ {id:'l',label:'Length',kind:'len',ph:'5',defUnit:'m'},
{id:'w',label:'Width',kind:'len',ph:'4',defUnit:'m'},
{id:'t',label:'Screed thickness',kind:'sm',ph:'50',defUnit:'mm',quick:[1,2]} ],
extrasHTML:function(){
return '
'
+'
'
+'
'
+'
'
+'
'
+'
'
+ P5.wasteRowHTML(10);
},
empty:'Enter the room size and screed thickness above.',
toImp:function(vals,units){
return {
lFt:P5.toFt(vals.l,units.l), wFt:P5.toFt(vals.w,units.w),
tIn:P5.toIn(vals.t,units.t)
};
},
render:function(imp, vals, units, panel){
var mixSel = panel.querySelector('.mixSel');
var ratio = mixSel ? parseFloat(mixSel.value) : 4;
var stypeSel = panel.querySelector('.stypeSel');
var stype = stypeSel ? stypeSel.value : 'bonded';
var bagSel = panel.querySelector('.bagSel');
var bagKg = bagSel ? parseFloat(bagSel.value) : 25;
var waste = P5.readWaste(panel);
var areaM2 = imp.lFt * 0.3048 * imp.wFt * 0.3048;
var thickMm = imp.tIn * 25.4;
var R = P5.calcScreed({areaM2:areaM2, thickMm:thickMm, ratio:ratio, waste:waste, bagKg:bagKg});
var mins = {bonded:25, unbonded:50, floating:65};
var typeNames = {bonded:'Bonded', unbonded:'Unbonded', floating:'Floating'};
var h = '
Floor screed materials
';
h += '
';
h += P5.nwColHTML('Cement',
[{icon:'bags',big:P5.fmt(R.bags,0),lbl:'Bags of '+bagKg+' kg'},{icon:'cube',big:P5.fmt(R.cementKg,0),lbl:'Kilograms of cement'}],
[[P5.fmt(R.cementVol),'m3 of cement (dry volume)'],['1 : '+P5.fmt(ratio,1),'cement to sand mix']]);
h += P5.nwColHTML('Sand',
[{icon:'pile',big:P5.fmt(R.sandVol),lbl:'m3 of Sand'},{icon:'pile',big:P5.fmt(R.sandTonnes),lbl:'Tonnes of Sand'}],
[[P5.fmt(R.wet),'m3 wet screed'],[P5.fmt(R.orderWet),'m3 with '+P5.fmt(waste,0)+'% waste'],[P5.fmt(R.dry),'m3 dry materials']]);
h += '
';
h += P5.workingHTML('Area = '+P5.fmt(areaM2)+' m2. Wet volume = '+P5.fmt(areaM2)+' x '+P5.fmt(thickMm,1)+' mm = '+P5.fmt(R.wet)+' m3; with waste '+P5.fmt(R.orderWet)+' m3; dry volume = '+P5.fmt(R.orderWet)+' x 1.33 = '+P5.fmt(R.dry)+' m3. Cement = '+P5.fmt(R.dry)+' / '+(1+ratio)+' = '+P5.fmt(R.cementKg,0)+' kg = '+P5.fmt(R.bags,0)+' bags. Sand = '+P5.fmt(R.sandVol)+' m3 ('+P5.fmt(R.sandTonnes)+' tonnes).');
if(thickMm < mins[stype]){
h += P5.noteHTML('Thickness warning: a '+typeNames[stype].toLowerCase()+' levelling screed should be at least '+mins[stype]+' mm thick to BS 8204-1. Your '+P5.fmt(thickMm,1)+' mm layer is below that minimum, so check the construction type or increase the thickness.');
} else {
h += P5.noteHTML(typeNames[stype]+' screed minimum to BS 8204-1: '+mins[stype]+' mm. Your '+P5.fmt(thickMm,1)+' mm layer meets that minimum. Bonded screeds need a clean, sound slab and a bonding agent or grout; unbonded and floating screeds sit on a separating membrane or insulation.');
}
h += P5.noteHTML('Screed dries at roughly 1 mm per day up to 50 mm thick in normal indoor conditions, so a 50 mm screed needs about 50 days before floor finishes go down. Do not force dry with direct heat. Quantities are estimates: actual cement and sand vary with moisture, compaction and how level the slab below is.');
h += P5.actionsHTML('screed')+'
';
var summary = 'Floor screed ('+P5.fmt(areaM2)+' m2 at '+P5.fmt(thickMm,1)+' mm, 1:'+P5.fmt(ratio,1)+'): '+P5.fmt(R.bags,0)+' bags of '+bagKg+' kg cement and '+P5.fmt(R.sandVol)+' m3 sand ('+P5.fmt(R.sandTonnes)+' tonnes). via concretequantity.com/floor-screed-calculator/';
return {html:h, summary:summary};
},
verified:'Dry volume factor 1.33, cement bulk density 1,440 kg/m3 and sand bulk density 1,600 kg/m3: standard published values used by screed and mix calculators. BS 8204-1 minimum thicknesses: bonded 25 mm, unbonded 50 mm, floating 65 mm. Drying guide of about 1 mm per day to 50 mm: widely published screed drying guidance.',
links:['slab','mortar','gravel','bags','cost','leveler']
});
})();
/* ============================================================
ConcreteQuantity Calculator: Phase 2 batch 4 chunk - Ramp
ADDITIVE chunk. Registers the 'ramp' mode with P5.
Does not touch V6, the batch 1 (P2) script, the batch 2 (P3)
script, the batch 3 (P4) script, or any existing tools.
Constants (2010 ADA Standards for Accessible Design):
- Maximum running slope 1:12 (8.33%), section 405.2
- Maximum rise per ramp run 30 in, section 405.6
- Minimum clear width 36 in, section 405.5
- Minimum landing length 60 in, section 405.7
- Handrails required when a run rises more than 6 in,
section 405.8
Model: the ramp is a uniform thickness slab laid on a
prepared slope, so ramp volume = sloped length x width x
thickness. Intermediate landings are flat slabs 60 in long
at the same width and thickness. This is a planning and
materials tool, not a code compliance certification: local
codes can be stricter than the federal baseline.
============================================================ */
(function(){
"use strict";
P5.calcRamp = function(o){
// o: {riseIn, denom, widthFt, thickIn} {waste} waste percent.
var runIn = (o.riseIn||0) * (o.denom||12);
var riseFt = (o.riseIn||0)/12;
var runFt = runIn/12;
var slopeLenFt = Math.sqrt(runFt*runFt + riseFt*riseFt);
var slopePct = (o.denom||12) ? (100/(o.denom||12)) : 0;
var angleDeg = Math.atan(1/(o.denom||12)) * 180/Math.PI;
var runs = P5.ceilSafe((o.riseIn||0)/P5.ADA_MAX_RISE_IN);
if(runs < 1) runs = 1;
var landings = runs - 1;
var thickFt = (o.thickIn||0)/12;
var rampFt3 = slopeLenFt * (o.widthFt||0) * thickFt;
var landingFt3 = landings * (P5.ADA_LANDING_IN/12) * (o.widthFt||0) * thickFt;
var totalFt3 = rampFt3 + landingFt3;
var orderFt3 = totalFt3 * (1 + (o.waste||0)/100);
return {
runIn: runIn, runFt: runFt, slopeLenFt: slopeLenFt,
slopePct: slopePct, angleDeg: angleDeg, runs: runs,
landings: landings, rampFt3: rampFt3, landingFt3: landingFt3,
totalFt3: totalFt3, orderFt3: orderFt3,
yd3: totalFt3/27, orderYd3: orderFt3/27,
m3: totalFt3 * P5.M3_PER_FT3, orderM3: orderFt3 * P5.M3_PER_FT3,
bags80: P5.ceilSafe(orderFt3/P5.BAG.b80),
slopeOk: (o.denom||12) >= P5.ADA_MAX_DENOM,
widthOk: (o.widthFt||0)*12 >= P5.ADA_MIN_WIDTH_IN,
handrails: (o.riseIn||0) > P5.ADA_HANDRAIL_RISE_IN
};
};
function rampSVG(live){
function t(fid, fb){
var e = live[fid];
if(e && e.val !== '') return P5.esc(String(e.val)+' '+(e.unit||''));
return fb;
}
var h = '';
return h;
}
P5.register({
id:'ramp', tab:'Ramp', title:'Concrete Ramp Calculator',
formula:'Run = Rise x slope denominator; sloped length = sqrt(run squared + rise squared); volume = sloped length x width x thickness',
diagram: rampSVG,
fields:[ {id:'rise',label:'Total vertical rise',kind:'sm',ph:'24',defUnit:'in'},
{id:'width',label:'Ramp width',kind:'len',ph:'3',defUnit:'ft'},
{id:'t',label:'Slab thickness',kind:'sm',ph:'4',defUnit:'in',quick:[4,6]} ],
extrasHTML:function(){
return '
'
+'
'
+ P5.wasteRowHTML(10);
},
empty:'Enter the total rise, width and slab thickness above.',
toImp:function(vals,units){
return {
riseIn:P5.toIn(vals.rise,units.rise),
widthFt:P5.toFt(vals.width,units.width),
tIn:P5.toIn(vals.t,units.t)
};
},
render:function(imp, vals, units, panel){
var slopeSel = panel.querySelector('.slopeSel');
var denom = slopeSel ? parseFloat(slopeSel.value) : 12;
var waste = P5.readWaste(panel);
var R = P5.calcRamp({riseIn:imp.riseIn, denom:denom, widthFt:imp.widthFt, thickIn:imp.tIn, waste:waste});
var h = '
Concrete ramp
';
h += '
';
h += P5.nwColHTML('Concrete',
[{icon:'ramp',big:P5.fmt(R.totalFt3,1),lbl:'Cubic Feet (net)'},{icon:'cube',big:P5.fmt(R.yd3),lbl:'Cubic Yards (net)'},{icon:'bags',big:P5.fmt(R.bags80,0),lbl:'80 lb Bags (with waste)'}],
[[P5.fmt(R.orderFt3,1),'ft3 to order'],[P5.fmt(R.orderYd3),'yd3 to order'],[P5.fmt(R.orderM3),'m3 to order']]);
h += P5.nwColHTML('Ramp layout',
[{icon:'ramp',big:P5.fmt(R.runFt,1),lbl:'Feet of Run'},{icon:'ramp',big:P5.fmt(R.slopeLenFt,1),lbl:'Feet of Sloped Surface'}],
[['1 : '+P5.fmt(denom,0),'slope'],[P5.fmt(R.slopePct,2)+'%','grade'],[P5.fmt(R.angleDeg,2)+' deg','angle'],[R.runs+' run'+(R.runs>1?'s':''),'at 30 in max rise each'],[R.landings+' intermediate landing'+(R.landings!==1?'s':''),'60 in long each']]);
h += '
';
h += P5.workingHTML('Run = '+P5.fmt(imp.riseIn,1)+' in x '+P5.fmt(denom,0)+' = '+P5.fmt(R.runFt,1)+' ft. Sloped length = sqrt('+P5.fmt(R.runFt,1)+' squared + '+(imp.riseIn/12).toFixed(2)+' squared) = '+P5.fmt(R.slopeLenFt,2)+' ft. Ramp concrete = '+P5.fmt(R.slopeLenFt,2)+' x '+P5.fmt(imp.widthFt,1)+' ft x '+P5.fmt(imp.tIn,1)+' in = '+P5.fmt(R.rampFt3,1)+' ft3. Landings add '+P5.fmt(R.landingFt3,1)+' ft3, total '+P5.fmt(R.totalFt3,1)+' ft3.');
if(R.slopeOk && R.widthOk){
h += P5.noteHTML('Slope check: 1 : '+P5.fmt(denom,0)+' ('+P5.fmt(R.slopePct,2)+'%) is within the ADA maximum running slope of 1 : 12, and the width of '+P5.fmt(imp.widthFt*12,0)+' in meets the ADA minimum clear width of 36 in.');
} else {
if(!R.slopeOk) h += P5.noteHTML('Slope check: 1 : '+P5.fmt(denom,0)+' is steeper than the ADA maximum of 1 : 12. Lengthen the run, add a switchback, or treat it as an assisted ramp only.');
if(!R.widthOk) h += P5.noteHTML('Width check: the ADA minimum clear width is 36 in. Your ramp is '+P5.fmt(imp.widthFt*12,0)+' in wide.');
}
if(R.handrails){
h += P5.noteHTML('Handrails: a ramp run rising more than 6 in needs handrails on both sides to ADA section 405.8. This rise needs handrails.');
}
if(R.landings > 0){
h += P5.noteHTML('Landings: no single ramp run may rise more than 30 in, so this climb is split into '+R.runs+' runs with '+R.landings+' level landing'+(R.landings!==1?'s':'')+' of 60 in between them. Top and bottom landings are needed too and are not counted in the concrete above.');
}
h += P5.noteHTML('Planning figures only, not a code compliance certification. Landings, handrails, edge protection, cross slope and drainage also decide whether a ramp passes inspection, and local codes can be stricter than the federal baseline.');
h += P5.actionsHTML('ramp')+'
';
var summary = 'Concrete ramp (rise '+P5.fmt(imp.riseIn,1)+' in at 1:'+P5.fmt(denom,0)+', '+P5.fmt(imp.widthFt,1)+' ft wide): run '+P5.fmt(R.runFt,1)+' ft, '+P5.fmt(R.totalFt3,1)+' ft3 ('+P5.fmt(R.yd3)+' yd3) net, '+P5.fmt(R.bags80,0)+' bags of 80 lb with waste. via concretequantity.com/concrete-ramp-calculator/';
return {html:h, summary:summary};
},
verified:'ADA limits from the 2010 ADA Standards for Accessible Design: maximum running slope 1:12 (section 405.2), maximum rise per run 30 in (section 405.6), minimum clear width 36 in (section 405.5), minimum landing length 60 in (section 405.7), handrails when a run rises more than 6 in (section 405.8). Ramp volume is the sloped slab model: sloped length x width x thickness.',
links:['stairs','sidewalk','patio','slab','bags','cost']
});
})();
/* ============================================================
ConcreteQuantity Calculator: Phase 2 batch 4 chunk - Mono
ADDITIVE chunk. Registers the 'mono' mode with P5.
Does not touch V6, the batch 1 (P2) script, the batch 2 (P3)
script, the batch 3 (P4) script, or any existing tools.
A monolithic slab is a slab and its perimeter footing poured
as one piece: a flat field slab plus a thickened edge beam
around the perimeter. The edge beam is deeper than the field
slab, so the extra concrete is the perimeter ring area times
the extra depth. The ring area is perimeter x edge width
minus the four corners counted twice (4 x edge width squared).
This tool is different from the existing slab tool (flat slab
only) and the existing footing tool (strip footings alone):
it combines both in one pour and avoids double counting the
corners where the edge beam turns.
Edge width and edge depth are the total dimensions of the
thickened edge, not additions on top of the slab thickness.
============================================================ */
(function(){
"use strict";
P5.calcMono = function(o){
// o: {lFt, wFt, tIn, ewIn, edIn} {waste} waste percent.
var tFt = (o.tIn||0)/12;
var ewFt = (o.ewIn||0)/12;
var edFt = (o.edIn||0)/12;
var fieldFt3 = (o.lFt||0) * (o.wFt||0) * tFt;
var perimeter = 2 * ((o.lFt||0) + (o.wFt||0));
var ringFt2 = perimeter * ewFt - 4 * ewFt * ewFt;
if(ringFt2 < 0) ringFt2 = 0;
var extraFt = edFt - tFt;
if(extraFt < 0) extraFt = 0;
var edgeFt3 = ringFt2 * extraFt;
var totalFt3 = fieldFt3 + edgeFt3;
var orderFt3 = totalFt3 * (1 + (o.waste||0)/100);
return {
fieldFt3: fieldFt3, perimeter: perimeter, ringFt2: ringFt2,
edgeFt3: edgeFt3, totalFt3: totalFt3, orderFt3: orderFt3,
yd3: totalFt3/27, orderYd3: orderFt3/27,
m3: totalFt3 * P5.M3_PER_FT3, orderM3: orderFt3 * P5.M3_PER_FT3,
bags80: P5.ceilSafe(orderFt3/P5.BAG.b80),
areaFt2: (o.lFt||0) * (o.wFt||0),
edgeShallow: (o.edIn||0) <= (o.tIn||0)
};
};
function monoSVG(live){
function t(fid, fb){
var e = live[fid];
if(e && e.val !== '') return P5.esc(String(e.val)+' '+(e.unit||''));
return fb;
}
var h = '';
return h;
}
P5.register({
id:'mono', tab:'Monolithic Slab', title:'Monolithic Slab Calculator',
formula:'Total = field slab (L x W x thickness) + edge ring (perimeter x edge width minus 4 corners) x extra depth',
diagram: monoSVG,
fields:[ {id:'l',label:'Slab length',kind:'len',ph:'40',defUnit:'ft'},
{id:'w',label:'Slab width',kind:'len',ph:'30',defUnit:'ft'},
{id:'t',label:'Field slab thickness',kind:'sm',ph:'4',defUnit:'in',quick:[4,6]},
{id:'ew',label:'Edge beam width',kind:'sm',ph:'12',defUnit:'in',quick:[12,16,20]},
{id:'ed',label:'Edge beam total depth',kind:'sm',ph:'12',defUnit:'in',quick:[12,16,24]} ],
extrasHTML:function(){
return P5.wasteRowHTML(10);
},
empty:'Enter the slab size, field thickness and edge beam size above.',
toImp:function(vals,units){
return {
lFt:P5.toFt(vals.l,units.l), wFt:P5.toFt(vals.w,units.w),
tIn:P5.toIn(vals.t,units.t), ewIn:P5.toIn(vals.ew,units.ew),
edIn:P5.toIn(vals.ed,units.ed)
};
},
render:function(imp, vals, units, panel){
var waste = P5.readWaste(panel);
var R = P5.calcMono({lFt:imp.lFt, wFt:imp.wFt, tIn:imp.tIn, ewIn:imp.ewIn, edIn:imp.edIn, waste:waste});
var h = '
Monolithic slab concrete
';
h += '
';
h += P5.nwColHTML('Concrete',
[{icon:'edge',big:P5.fmt(R.totalFt3,1),lbl:'Cubic Feet (net)'},{icon:'cube',big:P5.fmt(R.yd3),lbl:'Cubic Yards (net)'},{icon:'bags',big:P5.fmt(R.bags80,0),lbl:'80 lb Bags (with waste)'}],
[[P5.fmt(R.orderFt3,1),'ft3 to order'],[P5.fmt(R.orderYd3),'yd3 to order'],[P5.fmt(R.orderM3),'m3 to order']]);
h += P5.nwColHTML('Breakdown',
[{icon:'slab',big:P5.fmt(R.fieldFt3,1),lbl:'Field Slab ft3'},{icon:'edge',big:P5.fmt(R.edgeFt3,1),lbl:'Edge Beam ft3'}],
[[P5.fmt(R.areaFt2,0),'ft2 slab area'],[P5.fmt(R.perimeter,0),'ft perimeter'],[P5.fmt(R.ringFt2,1),'ft2 edge ring area']]);
h += '
';
h += P5.workingHTML('Field slab = '+P5.fmt(imp.lFt,1)+' x '+P5.fmt(imp.wFt,1)+' x '+(imp.tIn/12).toFixed(3)+' ft = '+P5.fmt(R.fieldFt3,1)+' ft3. Edge ring = '+P5.fmt(R.perimeter,0)+' ft perimeter x '+(imp.ewIn/12).toFixed(2)+' ft minus 4 corners ('+P5.fmt(4*(imp.ewIn/12)*(imp.ewIn/12),2)+' ft2) = '+P5.fmt(R.ringFt2,1)+' ft2. Edge beam = '+P5.fmt(R.ringFt2,1)+' x '+((imp.edIn-imp.tIn)/12).toFixed(3)+' ft extra depth = '+P5.fmt(R.edgeFt3,1)+' ft3. Total = '+P5.fmt(R.totalFt3,1)+' ft3 ('+P5.fmt(R.yd3)+' yd3).');
if(R.edgeShallow){
h += P5.noteHTML('Edge note: the edge beam depth is no deeper than the field slab, so there is no thickened edge to add. The total is just the flat slab volume. Increase the edge depth above the field thickness to model a real monolithic edge.');
} else {
h += P5.noteHTML('Monolithic pour: slab and edge beam go in as one piece, so there is no cold joint between them. The edge depth shown is the total depth at the perimeter, including the field slab thickness, not an extra layer on top.');
}
h += P5.noteHTML('Footings must reach below the local frost line and suit the soil and loads, which this volume tool does not check. Treat the edge depth as a planning figure and confirm footing sizes against local code before pouring.');
h += P5.actionsHTML('mono')+'
';
var summary = 'Monolithic slab ('+P5.fmt(imp.lFt,1)+' x '+P5.fmt(imp.wFt,1)+' ft, '+P5.fmt(imp.tIn,1)+' in field, '+P5.fmt(imp.ewIn,1)+' x '+P5.fmt(imp.edIn,1)+' in edge): '+P5.fmt(R.totalFt3,1)+' ft3 ('+P5.fmt(R.yd3)+' yd3) net, '+P5.fmt(R.bags80,0)+' bags of 80 lb with waste. via concretequantity.com/monolithic-slab-calculator/';
return {html:h, summary:summary};
},
verified:'Ring area geometry: perimeter x edge width minus 4 x edge width squared removes the double counted corners, verified by the rectangle minus inner rectangle identity (L x W minus (L minus 2w) x (W minus 2w)). Volumes are plain geometry from the entered dimensions; no structural sizing is claimed.',
links:['slab','footing','driveway','bags','cost','rebar']
});
})();
/* ============================================================
ConcreteQuantity Calculator: Phase 2 batch 4 chunk - Formwork
ADDITIVE chunk. Registers the 'formwork' mode with P5.
Does not touch V6, the batch 1 (P2) script, the batch 2 (P3)
script, the batch 3 (P4) script, or any existing tools.
Wall formwork material planning (not structural form design):
- Form contact area = 2 sides x length x height
- Plywood: one 4 ft x 8 ft sheet covers 32 ft2
- Studs: vertical supports at 16 in (1.33 ft) spacing, one
extra stud at the end of each side, both sides
- Walers: horizontal boards at 24 in (2 ft) row spacing,
10 ft boards, both sides
- Ties: one tie per 2 ft x 2 ft grid point
- Release agent: 750 ft2 per gallon
Counts are rounded up to whole pieces to buy. This tool
plans materials only: it does not check form pressure,
plywood strength, tie ratings or bracing, which need a
qualified designer for tall or fast pours.
============================================================ */
(function(){
"use strict";
P5.calcFormwork = function(o){
// o: {lenFt, heightFt, walls} walls = number of identical walls.
var walls = o.walls || 1;
var areaFt2 = 2 * (o.lenFt||0) * (o.heightFt||0) * walls;
var sheets = P5.ceilSafe(areaFt2 / P5.FORM_SHEET_FT2);
var studsPerSide = Math.floor((o.lenFt||0) / P5.FORM_STUD_FT) + 1;
var studs = studsPerSide * 2 * walls;
var walerRows = P5.ceilSafe((o.heightFt||0) / P5.FORM_WALER_FT);
var walerBoardsPerRow = P5.ceilSafe((o.lenFt||0) / P5.FORM_LUMBER_FT);
var walers = walerRows * walerBoardsPerRow * 2 * walls;
var ties = P5.ceilSafe((o.lenFt||0) / P5.FORM_TIE_FT) * P5.ceilSafe((o.heightFt||0) / P5.FORM_TIE_FT) * walls;
var releaseGal = areaFt2 / P5.FORM_RELEASE_FT2_GAL;
return {
areaFt2: areaFt2, areaM2: areaFt2 * 0.092903,
sheets: sheets, studsPerSide: studsPerSide, studs: studs,
walerRows: walerRows, walerBoardsPerRow: walerBoardsPerRow,
walers: walers, ties: ties, releaseGal: releaseGal,
releaseL: releaseGal * P5.GAL_TO_LITRE
};
};
function formworkSVG(live){
function t(fid, fb){
var e = live[fid];
if(e && e.val !== '') return P5.esc(String(e.val)+' '+(e.unit||''));
return fb;
}
var h = '';
return h;
}
P5.register({
id:'formwork', tab:'Formwork', title:'Concrete Formwork Calculator',
formula:'Form area = 2 x length x height; sheets = area / 32 ft2; studs at 16 in; walers at 24 in; ties on a 2 ft grid',
diagram: formworkSVG,
fields:[ {id:'l',label:'Wall length',kind:'len',ph:'20',defUnit:'ft'},
{id:'height',label:'Wall height',kind:'len',ph:'8',defUnit:'ft'},
{id:'walls',label:'Number of identical walls',kind:'num',ph:'1',optional:true} ],
empty:'Enter the wall length and height above.',
toImp:function(vals,units){
return {
lenFt:P5.toFt(vals.l,units.l),
heightFt:P5.toFt(vals.height,units.height),
walls:(parseFloat(vals.walls)||1)
};
},
render:function(imp, vals, units, panel){
var R = P5.calcFormwork({lenFt:imp.lenFt, heightFt:imp.heightFt, walls:imp.walls});
var h = '
Wall formwork materials
';
h += '
';
h += P5.nwColHTML('Sheets and timber',
[{icon:'form',big:P5.fmt(R.sheets,0),lbl:'Plywood Sheets (4 x 8 ft)'},{icon:'form',big:P5.fmt(R.studs,0),lbl:'Studs (16 in spacing)'},{icon:'form',big:P5.fmt(R.walers,0),lbl:'Waler Boards (10 ft)'}],
[[P5.fmt(R.areaFt2,0),'ft2 form contact area'],[P5.fmt(R.areaM2,1),'m2 contact area'],[R.studsPerSide+' per side','studs, end stud included'],[R.walerRows+' rows','of walers per side']]);
h += P5.nwColHTML('Ties and release agent',
[{icon:'form',big:P5.fmt(R.ties,0),lbl:'Form Ties (2 ft grid)'},{icon:'drop',big:P5.fmt(R.releaseGal,2),lbl:'Gallons Release Agent'}],
[[P5.fmt(R.releaseL,2),'litres release agent'],['750 ft2 per gallon','release coverage']]);
h += '
';
h += P5.workingHTML('Form area = 2 sides x '+P5.fmt(imp.lenFt,1)+' ft x '+P5.fmt(imp.heightFt,1)+' ft'+(imp.walls>1?' x '+P5.fmt(imp.walls,0)+' walls':'')+' = '+P5.fmt(R.areaFt2,0)+' ft2. Sheets = '+P5.fmt(R.areaFt2,0)+' / 32 = '+P5.fmt(R.sheets,0)+'. Studs = (floor('+P5.fmt(imp.lenFt,1)+' / 1.33) + 1) x 2 sides'+(imp.walls>1?' x '+P5.fmt(imp.walls,0)+' walls':'')+' = '+P5.fmt(R.studs,0)+'. Walers = '+R.walerRows+' rows x '+R.walerBoardsPerRow+' boards x 2 sides'+(imp.walls>1?' x '+P5.fmt(imp.walls,0)+' walls':'')+' = '+P5.fmt(R.walers,0)+'. Ties = '+P5.fmt(R.ties,0)+'. Release agent = '+P5.fmt(R.releaseGal,2)+' gallons.');
h += P5.noteHTML('Materials planning only. This tool does not check concrete pressure on the forms, plywood bending strength, tie load ratings or bracing. Tall walls, fast pour rates and hot weather raise form pressure sharply: get tall or critical formwork designed by a qualified person.');
h += P5.noteHTML('Counts are rounded up to whole pieces and include one end stud per side. Allow extra for cuts, corners, bracing and waste: timber and plywood offcuts add up fast on real walls.');
h += P5.actionsHTML('formwork')+'
';
var summary = 'Wall formwork ('+P5.fmt(imp.lenFt,1)+' x '+P5.fmt(imp.heightFt,1)+' ft'+(imp.walls>1?', '+P5.fmt(imp.walls,0)+' walls':'')+'): '+P5.fmt(R.sheets,0)+' plywood sheets, '+P5.fmt(R.studs,0)+' studs, '+P5.fmt(R.walers,0)+' waler boards, '+P5.fmt(R.ties,0)+' ties, '+P5.fmt(R.releaseGal,2)+' gallons release agent. via concretequantity.com/concrete-formwork-calculator/';
return {html:h, summary:summary};
},
verified:'Formwork planning constants from published formwork calculators and guides: 4 ft x 8 ft plywood sheets (32 ft2), stud spacing 16 in, waler row spacing 24 in with 10 ft boards, tie grid 2 ft x 2 ft, release agent coverage 750 ft2 per gallon. Counts are whole pieces rounded up; no structural form design is claimed.',
links:['wall','footing','column','rebar','bags']
});
})();
/* ============================================================
ConcreteQuantity Calculator: Phase 2 batch 4 chunk - Leveler
ADDITIVE chunk. Registers the 'leveler' mode with P5.
Does not touch V6, the batch 1 (P2) script, the batch 2 (P3)
script, the batch 3 (P4) script, or any existing tools.
Self levelling compound quantities from the manufacturer
consumption method: weight = area x thickness x consumption
rate (kg per m2 per mm). Default rate 1.7 kg/m2/mm sits
just above the published ARDEX K 15 figure (a 20 kg bag
covers about 12 m2 at 1 mm, about 1.67 kg/m2/mm) and inside
the published 1.60 to 1.70 kg/m2/mm band for 25 kg bags
(about 14 to 15 m2 per mm). The rate is user adjustable
because every product prints its own rate on the bag.
This tool is different from the screed tool: screed is a
sand and cement layer mixed on site, while self levelling
compound is a bagged, pourable product dosed by the
manufacturer's kg per m2 per mm rate.
============================================================ */
(function(){
"use strict";
P5.calcLeveler = function(o){
// o: {areaM2, thickMm, rate} rate = kg/m2 per mm.
// {waste} waste percent, {bagKg} bag size in kg.
var kg = (o.areaM2||0) * (o.thickMm||0) * (o.rate||P5.SLC_RATE);
var orderKg = kg * (1 + (o.waste||0)/100);
var bagKg = o.bagKg || 25;
var volM3 = (o.areaM2||0) * ((o.thickMm||0)/1000);
var coverPerBag = (o.thickMm||0) > 0 ? bagKg / ((o.rate||P5.SLC_RATE) * (o.thickMm||0)) : 0;
return {
kg: kg, orderKg: orderKg, bags: P5.ceilSafe(orderKg/bagKg),
volM3: volM3, volL: volM3 * 1000, coverPerBag: coverPerBag,
areaM2: o.areaM2||0, thickMm: o.thickMm||0
};
};
function levelerSVG(live){
function t(fid, fb){
var e = live[fid];
if(e && e.val !== '') return P5.esc(String(e.val)+' '+(e.unit||''));
return fb;
}
var h = '';
return h;
}
P5.register({
id:'leveler', tab:'Self Levelling', title:'Self Levelling Compound Calculator',
formula:'Weight = Area x Thickness x consumption rate (kg per m2 per mm); bags = weight / bag size',
diagram: levelerSVG,
fields:[ {id:'l',label:'Length',kind:'len',ph:'5',defUnit:'m'},
{id:'w',label:'Width',kind:'len',ph:'4',defUnit:'m'},
{id:'t',label:'Average thickness',kind:'sm',ph:'3',defUnit:'mm'} ],
extrasHTML:function(){
return '
'
+'
'
+'
'
+'
'
+ P5.wasteRowHTML(10);
},
empty:'Enter the room size and average thickness above.',
validateExtra:function(panel, vals, units){
var empty = '
Enter the room size and average thickness above.
';
if(!vals.l || !vals.w || !vals.t) return empty;
return null;
},
toImp:function(vals,units){
return {
lFt:P5.toFt(vals.l,units.l), wFt:P5.toFt(vals.w,units.w),
tIn:P5.toIn(vals.t,units.t)
};
},
render:function(imp, vals, units, panel){
var rateInp = panel.querySelector('#p5-rate');
var rate = rateInp && rateInp.value ? parseFloat(rateInp.value) : P5.SLC_RATE;
if(!isFinite(rate) || rate <= 0) rate = P5.SLC_RATE;
var lbagSel = panel.querySelector('.lbagSel');
var bagKg = lbagSel ? parseFloat(lbagSel.value) : 25;
var waste = P5.readWaste(panel);
var areaM2 = imp.lFt * 0.3048 * imp.wFt * 0.3048;
var thickMm = imp.tIn * 25.4;
var R = P5.calcLeveler({areaM2:areaM2, thickMm:thickMm, rate:rate, waste:waste, bagKg:bagKg});
var bagLabel = (bagKg === 22.6796) ? '50 lb' : (P5.fmt(bagKg,0)+' kg');
var h = '
Self levelling compound
';
h += '
';
h += P5.nwColHTML('Bags to buy',
[{icon:'bags',big:P5.fmt(R.bags,0),lbl:'Bags of '+bagLabel},{icon:'cube',big:P5.fmt(R.orderKg,0),lbl:'Kilograms (with waste)'}],
[[P5.fmt(R.kg,0),'kg net'],[P5.fmt(R.coverPerBag,2),'m2 covered per bag at this thickness']]);
h += P5.nwColHTML('Volume',
[{icon:'level',big:P5.fmt(R.volM3,3),lbl:'Cubic Metres'},{icon:'level',big:P5.fmt(R.volL,0),lbl:'Litres'}],
[[P5.fmt(areaM2),'m2 floor area'],[P5.fmt(thickMm,1),'mm average thickness'],[P5.fmt(rate,2),'kg per m2 per mm used']]);
h += '
';
h += P5.workingHTML('Weight = '+P5.fmt(areaM2)+' m2 x '+P5.fmt(thickMm,1)+' mm x '+P5.fmt(rate,2)+' kg/m2/mm = '+P5.fmt(R.kg,0)+' kg; with '+P5.fmt(waste,0)+'% waste '+P5.fmt(R.orderKg,0)+' kg = '+P5.fmt(R.bags,0)+' bags. Volume = '+P5.fmt(R.volM3,3)+' m3. One bag covers '+P5.fmt(R.coverPerBag,2)+' m2 at this thickness.');
h += P5.noteHTML('Measure the average thickness, not the thinnest spot: floors that slope need the average of the shallow and deep ends, and a floor with one deep dip needs more than the average suggests. If the deepest spot is deeper than your product allows in one pour, lay it in two layers.');
h += P5.noteHTML('Always check the rate on your own bag: products vary, and a lightweight or rapid setting compound can use a different kg per m2 per mm figure. The default 1.7 is a planning figure, not a substitute for the product data sheet. Prime porous concrete first, or the compound can pin hole.');
h += P5.actionsHTML('leveler')+'
';
var summary = 'Self levelling compound ('+P5.fmt(areaM2)+' m2 at '+P5.fmt(thickMm,1)+' mm, '+P5.fmt(rate,2)+' kg/m2/mm): '+P5.fmt(R.bags,0)+' bags of '+bagLabel+' ('+P5.fmt(R.orderKg,0)+' kg with waste). via concretequantity.com/self-levelling-compound-calculator/';
return {html:h, summary:summary};
},
verified:'Consumption method from manufacturer guidance: weight = area x thickness x kg per m2 per mm. Default rate 1.7 kg/m2/mm sits just above the ARDEX K 15 published figure (20 kg bag covers about 12 m2 at 1 mm, about 1.67 kg/m2/mm) and inside the published 1.60 to 1.70 band for 25 kg bags (about 14 to 15 m2 per mm). Rate is user adjustable; the product data sheet governs.',
links:['screed','slab','sealer','bags','cost']
});
})();