JSPM

construction-cost-utils

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q60696F
  • License MIT

Free construction cost estimation utilities. Unit conversions, material calculators, and pricing data for 385 items across 32 trades.

Package Exports

  • construction-cost-utils
  • construction-cost-utils/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (construction-cost-utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

construction-cost-utils

Free construction cost estimation utilities for JavaScript and TypeScript. Unit conversions, material quantity calculators, and pricing data for 50 common items across 15 trades, with regional cost multipliers for all 50 US states + DC.

Part of the EstimationPro.AI platform. For the full database with 385 items across 32 trades, visit the EstimationPro API.

Installation

npm install construction-cost-utils

Quick Start

import {
  concreteYards,
  paintGallons,
  getItemPrice,
  adjustPrice,
} from 'construction-cost-utils';

// How much concrete for a 20x30 ft patio, 4 inches thick?
const yards = concreteYards(20, 30, 4);
console.log(`${yards} cubic yards`); // 7.5 cubic yards

// How many gallons of paint for a 1,200 sq ft room?
const gallons = paintGallons(1200);
console.log(`${gallons} gallons`); // 7 gallons (2 coats)

// Look up hardwood flooring cost
const hardwood = getItemPrice('hardwood-installed');
console.log(`$${hardwood?.typical}/sqft typical`); // $12/sqft typical

// Adjust for California pricing
const caPrice = adjustPrice(12, 'CA');
console.log(`$${caPrice}/sqft in CA`); // $14.16/sqft in CA

Unit Conversions

Convert between common construction measurement units.

import {
  sqftToSqyd,
  sqydToSqft,
  sqftToSqm,
  sqmToSqft,
  linearFtToM,
  mToLinearFt,
  cubicYdToCubicFt,
  cubicFtToCubicYd,
  cubicYdToCubicM,
  cubicMToCubicYd,
  boardFeet,
  roofingSquares,
} from 'construction-cost-utils';

// Area conversions
sqftToSqyd(900);     // 100 square yards
sqydToSqft(100);     // 900 square feet
sqftToSqm(1000);     // 92.90 square meters
sqmToSqft(100);      // 1076.39 square feet

// Length conversions
linearFtToM(10);     // 3.048 meters
mToLinearFt(3);      // 9.843 feet

// Volume conversions
cubicYdToCubicFt(1); // 27 cubic feet
cubicFtToCubicYd(54);// 2 cubic yards
cubicYdToCubicM(1);  // 0.7646 cubic meters
cubicMToCubicYd(1);  // 1.308 cubic yards

// Lumber: board feet for a 2x6x10 board
boardFeet(2, 6, 10); // 10 board feet

// Roofing: 2,000 sq ft roof
roofingSquares(2000); // 20 squares

Material Calculators

Calculate material quantities for common construction tasks. All calculators round up to whole units since you cannot buy partial sheets, gallons, or batts.

import {
  drywallSheets,
  paintGallons,
  concreteYards,
  mulchYards,
  tileQuantity,
  studCount,
  insulationBatts,
} from 'construction-cost-utils';

// Drywall sheets for a 400 sq ft room
drywallSheets(400);            // 13 sheets (4x8 default)
drywallSheets(400, 48);        // 9 sheets (4x12)

// Paint gallons for 1,500 sq ft, 2 coats
paintGallons(1500);            // 9 gallons
paintGallons(1500, 1);         // 5 gallons (1 coat)

// Concrete for a 12x12 patio, 4 inches deep
concreteYards(12, 12, 4);      // 1.75 cubic yards

// Mulch for a 500 sq ft garden bed, 3 inches deep
mulchYards(500);               // 2.5 cubic yards
mulchYards(500, 4);            // 3.5 cubic yards (4-inch depth)

// Tiles for 200 sq ft, 12x12 tiles (1 sq ft each), 10% waste
tileQuantity(200, 1.0);        // 220 tiles
tileQuantity(200, 1.0, 0.15);  // 230 tiles (15% waste for diagonal)

// Studs for a 24-ft wall, 16 inches on center
studCount(24);                 // 19 studs
studCount(24, 24);             // 13 studs (24" OC)

// Insulation batts for 400 sq ft of wall
insulationBatts(400);          // 42 batts (15" x 93" default)

Pricing Data

Look up national average pricing for 50 common construction items. Prices include low, typical, and high ranges. Data sourced from BLS, Angi, HomeAdvisor, and major retailer pricing.

import {
  getItemPrice,
  getTradeItems,
  getRegionalMultiplier,
  adjustPrice,
  listTrades,
} from 'construction-cost-utils';

// Look up a specific item
const item = getItemPrice('countertop-quartz');
// {
//   id: 'countertop-quartz',
//   description: 'Quartz countertop, installed',
//   unit: 'sq ft',
//   low: 50,
//   typical: 100,
//   high: 200,
//   trade: 'kitchen-remodel'
// }

// Get all items for a trade
const deckItems = getTradeItems('deck');
// Returns 3 deck-related pricing items

// List available trades
const trades = listTrades();
// ['concrete', 'flooring', 'roofing', 'tile', 'drywall', ...]

// Regional pricing adjustment
const multiplier = getRegionalMultiplier('TX');
// { stateCode: 'TX', multiplier: 0.90, region: 'west-south-central' }

// Adjust a national average price for Texas
adjustPrice(100, 'TX'); // 90.00 (Texas is 10% below national average)
adjustPrice(100, 'HI'); // 125.00 (Hawaii is 25% above national average)

Available Trades

The included pricing data covers these trades: concrete, flooring, roofing, tile, drywall, paint, deck, fence, electrical, plumbing, kitchen-remodel, bathroom-remodel, insulation, siding, labor-general, and hvac.

Regional Multipliers

All 50 US states plus DC are included. Multipliers are based on BLS OEWS May 2024 wage data, weighted by construction trade mix. A multiplier of 1.0 equals the national average.

Range States
1.15+ CA, HI, AK, NJ, MA, IL, NY
1.05-1.14 CO, CT, DC, MD, MN, NV, OR, WA, RI, PA, NH
0.95-1.04 AZ, DE, ID, ME, MI, MO, MT, UT, VA, VT, WI, WY
0.85-0.94 AL, AR, FL, GA, IA, IN, KS, KY, LA, NC, ND, NE, NM, OH, OK, SC, SD, TN, TX
Below 0.85 MS (0.83)

TypeScript Types

All types are fully exported for use in your own code.

import type {
  PricingItem,
  TradeGroup,
  RegionalMultiplier,
  ProjectCost,
} from 'construction-cost-utils';

Full API

This package includes a curated subset of the EstimationPro pricing database. For the complete dataset with 385 items across 32 trades, metro-level multipliers, volatility tracking, and more, visit:

Attribution

If you use this data in a project, please include a link back to EstimationPro.AI. Example:

Pricing data provided by EstimationPro.AI (https://estimationpro.ai)

License

MIT