Skip to content

Instantly share code, notes, and snippets.

@hayes0724
Created June 14, 2015 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hayes0724/2543d1e74a094ec4fbde to your computer and use it in GitHub Desktop.
Save hayes0724/2543d1e74a094ec4fbde to your computer and use it in GitHub Desktop.
Tiling/Flooring Calculator
function cal() {
// Get total square feet to cover
var sf = document.getElementById('sf').value;
console.log(sf)
// Get tile size
var tileSize = document.getElementById('tileSize').value;
console.log(tileSize)
// Convert area to inches and divide by a single tile's area (ex 4x4 tile = 16), then divide by 144 to determine tiles needed.
var total = (sf * 144)/tileSize;
console.log(total)
// Add 10% for waste
var totalWaste = total * 1.1;
console.log(totalWaste)
// Output results
document.getElementById('total').innerHTML = total;
document.getElementById('totalSF').innerHTML = sf;
document.getElementById('totalWaste').innerHTML = totalWaste;
}
@Offe1981
Copy link

Offe1981 commented Nov 2, 2023

My time on your website was quite long. And saw the message you sent. It was fantastic. Let me add that Solutions is the epitome of strength and style in the vibrant commercial epoxy flooring Raleigh company area. For your business, our expert installation provides a strong and aesthetically pleasing foundation. Our flooring offers personalized solutions to meet your specific needs, ensuring a safe and professional environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment