I live in Pakistan, and I am still early in my web development journey. I wanted a small, useful site I could actually finish: a set of free US-unit concrete calculators that anyone could open in a browser, with no account, no install, and no JavaScript framework.

The result is Concrete Calculator Now. It is a folder of HTML, CSS, and JavaScript. You can visit it on the web, or you can double-click index.html and use it from a file:// address with no server at all.

Why I stayed on plain static files

Most tutorials I found started with a bundler, a framework, and a long list of packages. That is a good path for a larger app. For a calculator, it was more than I needed, and it would have hidden the parts I was trying to learn.

I gave myself three rules:

  1. The math has to run entirely in the browser. There is no backend and no third-party script.
  2. The pages have to work if someone saves the folder and opens index.html offline.
  3. I should be able to read every line.

Those rules pushed me away from a build step. Shared files such as styles.css and app.js, plus a small script per calculator, were enough. Links between pages stay relative, so the folder has to stay together. I also avoided a <base href> tag. That tag is convenient on a hosted site, but it breaks file:// links, and I wanted both to work.

There are ten calculators now. They cover poured volume, bag counts, concrete blocks, weight, and a cement-sand-gravel split, plus short About, Contact, Privacy, and Disclaimer pages. None of them chooses a slab thickness, a strength, or a building-code check. They estimate quantity from the numbers you type.

The volume math is short, and it is worth testing

A rectangular slab is the example I use most often. Length and width are in feet. Thickness is entered in inches, so it has to be converted to feet first. One cubic yard is 27 cubic feet:

cubic yards = length × width × (thickness ÷ 12) ÷ 27

Take a 10 ft by 10 ft slab, 4 inches thick. The base volume is 33.33 cubic feet, or 1.235 cubic yards. Most jobs then add a waste allowance once, often 10 percent, for spillage and an uneven base. At 10 percent, that slab becomes 36.67 cubic feet, or 1.358 cubic yards. The percent is not added a second time when the bag count is calculated.

Bag counts use that waste-adjusted volume and the published approximate yields for QUIKRETE Concrete Mix, product 1101: 0.30, 0.45, and 0.60 cubic feet for 40, 60, and 80 lb bags. Other brands can differ, so the pages say so. For the same 10×10×4 slab with 10 percent waste, that is 123 of the 40 lb bags, 82 of the 60 lb bags, or 62 of the 80 lb bags, each count rounded up to a whole bag.

The slab calculator is this shape only, including a count of identical slabs. The home page also covers footings, columns, walls, and solid-filled stairs. A later page, the footing calculator, totals a continuous strip footing and identical pad footings in one estimate, then applies the same waste and bag math.

Here is the shared core, taken from the real functions. Thickness is already in feet when it reaches rectangularVolume:

var CUBIC_FEET_PER_CUBIC_YARD = 27; function rectangularVolume(length, width, thicknessFeet) { return length * width * thicknessFeet; } function applyWaste(baseCubicFeet, wastePercent) { return { baseCubicFeet: baseCubicFeet, orderCubicFeet: baseCubicFeet * (1 + wastePercent / 100) }; } function cubicFeetToYards(cubicFeet) { return cubicFeet / CUBIC_FEET_PER_CUBIC_YARD; } 

I kept these as plain functions with no DOM inside them. Input parsing, error messages, and the result panel sit in a separate layer. That split is what made testing realistic for me as a beginner.

A few other details matter once you move past a single rectangle. Measurements accept feet and inches, including values such as 3.5 or 3 1/2. Waste is limited to 0 through 20 percent. Ready-mix can be rounded up to a supplier increment, such as 0.25 cubic yards, but bag counts still follow the unrounded volume with allowance. Prices can be left blank, which means "I do not know," or set to zero, which means "$0.00." The site never invents a supplier rate.

Node tests without a test framework

I did not want to set up Jest or Playwright just to check that a 10×10 slab at 4 inches still equals the same yardage next month. The project has a small runner, run-tests.cjs, that uses Node's built-in fs, path, and vm modules.

The runner reads each calculator script into a fresh sandbox, loads a matching *-tests.js file, and prints how many assertions passed. There is also a tests.html page if I want to run the engine tests in a browser. A .assetsignore file keeps the tests, the README, and the Worker config off the public site, so visitors do not download them.

The lesson I needed was simple: if the math lives in pure functions, node run-tests.cjs can catch a bad formula change without opening a browser. When I add a page, I add tests for that page in the same change.

Free hosting on a Cloudflare Worker

I host the folder with Cloudflare Workers. The Worker itself is tiny. It serves the static files from the project directory, returns 404.html with a real HTTP 404 for a missing path, and permanently redirects www.concretecalculatornow.com to the apex host, including the path and query string. Preview and workers.dev URLs are left alone, so a pull request preview still works.

A merge to main deploys automatically through Workers Builds, usually in about 30 seconds. I can also run npx wrangler deploy myself. For a static site of this size, the free tier has been enough. I did not need a VPS, PHP, or WordPress, and I did not have to change the HTML to make it work on Cloudflare.

What I learned about SEO as a beginner

Shipping the pages was only half the job. If you want a new site to have any chance in search, a few unglamorous files matter more than a fancy stack.

I keep a sitemap.xml with every public URL, and robots.txt points to it while blocking tests.html. I added the domain in Google Search Console and submitted that sitemap. After a new page goes live, I resubmit the sitemap. Canonical tags, social tags, and structured data all use the same origin, https://concretecalculatornow.com, with no www and no trailing slash after .com.

I also learned what not to expect. A new site will not rank just because the math is correct. Indexing takes time. Clear titles, a fast static page, honest formulas next to the results, and a sitemap you actually submit are a reasonable start.

If you want to do something similar

Start with one page and one formula. Put the math in functions you can test. Keep links relative. Deploy the folder. Submit the sitemap. Then add the next calculator.

You can try all the calculators free at Concrete Calculator Now. If you are also a beginner, I hope the boring parts — the division by 27, the waste percent, the Node tests, and the sitemap — save you a few days.