npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

concrete-calculator

v1.0.1

Published

Calculate concrete volume, bags, and costs for slabs, cylinders, footings, stairs, and custom shapes. Supports cubic yards, cubic meters, and bag estimates.

Readme

concrete-calculator

Lightweight, zero-dependency concrete volume, bag, and cost calculator for JavaScript and TypeScript.

Calculate how much concrete you need for slabs, cylinders, footings, stairs, curbs, and more — in cubic feet, cubic yards, or number of bags.

Built by SlabCalc.co — free online concrete calculators for contractors, DIYers, and engineers.

Install

npm install concrete-calculator

Quick Start

import { estimate } from 'concrete-calculator';

// 10 × 12 ft slab, 4 inches thick
const result = estimate(
  { length: 10, width: 12, thickness: 4 / 12 },
  { wasteFactor: 1.1 }  // 10% waste allowance
);

console.log(result);
// {
//   cubicFeet: 44,
//   cubicYards: 1.63,
//   bags: 74,           (80 lb bags)
//   bagCost: 481,       (at $6.50/bag)
//   readyMixCost: 244.44  (at $150/yard)
// }

Shapes

All shape functions accept dimensions in any consistent unit and return volume in that unit cubed.

import { slab, cylinder, footing, stairs, curb, hollowCylinder } from 'concrete-calculator';

// Rectangular slab: length × width × thickness
slab(20, 10, 0.33);  // 66 cu ft

// Cylinder / sonotube: diameter, height
cylinder(2, 4);  // 12.57 cu ft

// Continuous footing: length × width × depth
footing(40, 1.5, 1);  // 60 cu ft

// Staircase: risePerStep, runPerStep, width, numberOfSteps
stairs(7/12, 11/12, 3, 5);  // solid volume for 5 steps

// Curb: length × width × height
curb(100, 0.5, 0.5);  // 25 cu ft

// Hollow cylinder: outerDiameter, innerDiameter, height
hollowCylinder(4, 3, 5);  // ring volume

Need an interactive version? Try the Concrete Slab Calculator or the Concrete Column Calculator at SlabCalc.co.

Unit Conversions

import { cubicFeetToYards, cubicYardsToCubicFeet, cubicFeetToMeters, cubicMetersToYards } from 'concrete-calculator';

cubicFeetToYards(54);    // 2
cubicYardsToCubicFeet(2); // 54
cubicFeetToMeters(35.31); // ≈ 1
cubicMetersToYards(1);    // ≈ 1.31

Bag Estimation

Estimate pre-mixed concrete bags (Quikrete, Sakrete, etc.) needed for your project.

import { bagEstimate, bagsFromYards } from 'concrete-calculator';

// 50 cu ft with 80 lb bags
bagEstimate(50, 80);  // 84 bags

// 1 cubic yard with 60 lb bags
bagsFromYards(1, 60);  // 60 bags

// Supported bag sizes: 40, 50, 60, 80 (lbs)

Learn more about how many bags of concrete you need on SlabCalc.co.

Cost Estimation

import { readyMixCost, bagCost } from 'concrete-calculator';

// Ready-mix truck delivery
readyMixCost(3, 150);  // { yards: 3, cost: 450, shortLoad: false }

// With short-load fee ($100 under 1 yard)
readyMixCost(0.5, 150, 100, 1);  // { yards: 0.5, cost: 175, shortLoad: true }

// Bagged concrete cost
bagCost(50, 80, 6.50);  // { bags: 84, cost: 546 }

See the full Concrete Cost Calculator for a detailed breakdown including delivery fees, labor, and rebar.

All-in-One Estimate

The estimate() function gives you everything at once for a rectangular slab:

import { estimate } from 'concrete-calculator';

const result = estimate(
  { length: 20, width: 10, thickness: 6 / 12 },
  {
    wasteFactor: 1.1,      // 10% extra (default)
    bagSize: 80,           // 80 lb bags (default)
    pricePerBag: 6.50,     // per bag (default)
    pricePerYard: 150,     // ready-mix price (default)
  }
);

For more complex projects, use the interactive Concrete Slab Calculator at SlabCalc.co — it handles rebar spacing, sub-base depth, and generates full material lists.

TypeScript

Full type definitions are included out of the box.

import { estimate, slab, bagEstimate } from 'concrete-calculator';
// All functions are fully typed — no @types package needed.

Common Concrete Projects

| Project | Calculator | |---------|-----------| | Patio or driveway slab | Slab Calculator | | Deck or fence post footings | Footing Calculator | | Round columns / sonotubes | Column Calculator | | Steps and stairs | Stairs Calculator | | Retaining walls | Wall Calculator | | Curbs and gutters | Curb Calculator |

License

MIT — see LICENSE.


SlabCalc.co — Free concrete calculators, guides, and cost estimators for your next project.