AnnouncementApril 4, 20265 min read

We Open Sourced Our Construction Calculators

The pure math behind 26 free calculators — concrete, roofing, lumber, labor cost, and more — is now a zero-dependency TypeScript npm package anyone can use.

Why We Did It

BuildVision has 26 free construction calculators — concrete volume, roofing cost, lumber board feet, labor burden, critical path scheduling, and more. Thousands of contractors use them every month directly on our site.

The math powering those calculators was buried inside React components, tightly coupled to UI state and browser APIs. It couldn't be used outside the browser, couldn't be unit tested cleanly, and was invisible to the developer community.

So we extracted all of it into a standalone TypeScript package and open sourced it. No React. No DOM. No dependencies. Just pure calculation functions that work anywhere JavaScript runs.

What's in the Package

@buildvisionai/construction-calculators covers 26 calculation domains across five categories:

How to Use It

Install from npm:

npm install @buildvisionai/construction-calculators

Then import any function into your project:

import {
  calculateConcrete,
  calculateMarkup,
  calculateRoofingCost,
} from '@buildvisionai/construction-calculators';

// Concrete for a 20×30 ft slab, 4 inches thick
const slab = calculateConcrete({
  shape: 'rectangular',
  length: 20,
  width: 30,
  depth: 4 / 12,
  units: 'imperial',
});

console.log(slab.volumeCuYd);  // 2.22 cubic yards
console.log(slab.bagsNeeded);  // 134 × 60lb bags

// Price it with a 25% markup
const quote = calculateMarkup({ costs: 850, markupPercent: 25 });
console.log(quote.totalWithMarkup);      // $1,062.50
console.log(quote.profitMarginPercent);  // 20%

Every function accepts a units parameter — 'imperial' or 'metric' — and returns a fully typed result object. No setup, no config, no side effects.

Design Decisions

  • Zero dependencies. Nothing to audit, nothing to break, no supply chain risk.
  • Pure functions only. Input in, output out. No globals, no state, no DOM.
  • TypeScript first. Full types on every input and output — your editor will autocomplete the whole API.
  • Dual ESM + CJS output. Works in Next.js, Vite, Node scripts, edge runtimes, anywhere.
  • Imperial and metric. Every calculator supports both unit systems natively.

What's Next

The package is live and open source. We'd love contributions — especially for areas we haven't covered yet: HVAC load, electrical, plumbing, sitework, and earthworks.

In the meantime, try the live calculators at buildvisionai.com/calculators, star the repo on GitHub, or install the package and let us know what you build with it.

Don't Let This Happen to You

If you're still managing change orders through email, you're playing with fire. See how contractors are protecting themselves with proper documentation systems.

Want AI-powered takeoffs and estimates? Try BuildVision AI free — upload your plans and get a complete material list and quote in minutes.

We Open Sourced Our Construction Calculators | BuildVision AI