A precise, zero-dependency TypeScript calculator for woodworking material planning, moisture science, and joinery strength. Stop guessing and start building with confidence.
✅ Board Feet & Linear Feet – Calculate lumber volume and length from dimensions, supporting nominal sizes (2×4, etc.) and quantities.
✅ Sheet Material Planning – Determine plywood or MDF sheet counts with configurable waste factors.
✅ Moisture Content & Equilibrium – Compute MC from weight, predict EMC for your shop environment, and estimate drying times.
✅ Wood Shrinkage Prediction – Forecast dimensional changes for 10 common species when moisture content changes.
✅ Joinery Strength Calculator – Estimate the strength of 8 joint types (mortise-tenon, dovetail, box joint, lap, butt, dowel, biscuit, pocket hole) based on wood species, dimensions, and glue area.
bash bun add wood-calc
npm install wood-calc
import { calculateBoardFeet } from "wood-calc";
const result = calculateBoardFeet({ thickness: 1.5, width: 3.5, length: 96, quantity: 4, }); console.log(result.value); // ≈ 14.0 board feet
import { calculateSheetCount } from "wood-calc";
const sheets = calculateSheetCount({ area: 5760, sheetWidth: 48, sheetLength: 96, wasteFactor: 0.1, }); console.log(sheets.value); // 2 sheets
import { calculateMoistureContent, calculateEquilibriumMC } from "wood-calc";
const mc = calculateMoistureContent({ wetWeight: 12.5, dryWeight: 10.0 }); console.log(mc); // 25.0%
const emc = calculateEquilibriumMC({ temperature: 70, relativeHumidity: 50 }); console.log(emc); // ≈ 9.1%
import { calculateShrinkage, WoodSpecies } from "wood-calc";
const shrinkage = calculateShrinkage(WoodSpecies.Oak, 15, 8); console.log(shrinkage.radial); // radial shrinkage % console.log(shrinkage.tangential); // tangential shrinkage % console.log(shrinkage.volumetric); // volumetric shrinkage %
import { calculateJoineryStrength, JoineryType, WoodSpecies } from "wood-calc";
const result = calculateJoineryStrength({ joineryType: JoineryType.MortiseTenon, species: WoodSpecies.Oak, jointWidth: 2, jointDepth: 3, glueArea: 12, reinforced: false, }); console.log(result.estimatedStrength); // ≈ 29544 lbs console.log(result.maxRecommendedLoad); // ≈ 9848 lbs (with 3× safety factor) console.log(result.failureMode); // "Tenon shear or mortise wall splitting"
import { compareJoints, WoodSpecies } from "wood-calc";
const ranked = compareJoints(WoodSpecies.Oak, 2, 3, 10);
ranked.forEach(({ joineryType, result }) => {
console.log(${joineryType}: ${result.estimatedStrength} lbs);
});
// Sorted strongest to weakest
import { getSpeciesData, WoodSpecies } from "wood-calc";
const oak = getSpeciesData(WoodSpecies.Oak); console.log(oak.shearStrength); // 1780 psi console.log(oak.specificGravity); // 0.6 console.log(oak.modulusOfRupture); // 14300 psi
calculateBoardFeet(input)— Board feet from dimensionscalculateLinearFeet(input)— Linear feet from length × quantitycalculateSheetCount(input)— Sheet count with waste factorcalculateTotalBoardFeet(boards)— Sum board feet across multiple boardscalculateBoardFeetNominal(t, w, l, qty)— Board feet using nominal sizes (2×4, etc.)
calculateMoistureContent(input)— MC% from wet/dry weightscalculateEquilibriumMC(input)— EMC from temperature & humiditycalculateShrinkage(species, initialMC, finalMC)— Dimensional shrinkagegetShrinkageCoefficients(species)— Species shrinkage datagetFSPFactor(mc)— Fiber saturation point factorestimateDryingTime(thickness, initialMC, targetMC, temp, rh)— Drying time estimate
calculateJoineryStrength(input)— Estimate joint strength in lbs-forcegetSpeciesData(species)— Full mechanical properties for a speciescompareJoints(species, width, depth, glueArea)— Rank all 8 joint types by strength
WoodSpecies— Oak, Pine, Maple, Walnut, Cherry, DouglasFir, Cedar, Poplar, Hardwood, SoftwoodJoineryType— MortiseTenon, Dovetail, BoxJoint, LapJoint, ButtJoint, Dowel, Biscuit, PocketHole
bash bun test
MIT