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

calcufly-utils

v1.0.1

Published

Lightweight calculator utility functions for finance, health, math, and conversions. Used by CalcuFly.com

Readme

calcufly-utils

Lightweight calculator utility functions for finance, health, math, and conversions. Zero dependencies.

Used by CalcuFly.com — 600+ free online calculators in 26 languages.

Installation

npm install calcufly-utils

Usage

const calc = require('calcufly-utils');

// Finance
const loan = calc.mortgage(300000, 6.5, 30);
console.log(loan.monthly); // $1,896.20

const growth = calc.compoundInterest(10000, 7, 10);
console.log(growth.finalAmount); // $20,096.61

// Health
const body = calc.bmi(75, 175);
console.log(body.bmi); // 24.49
console.log(body.category); // "Normal"

const calories = calc.bmr(75, 175, 30, 'male');
console.log(calories); // 1,728.75

// Conversions
console.log(calc.convert(100, 'kmToMiles')); // 62.14
console.log(calc.convert(72, 'fahrenheitToCelsius')); // 22.22

// Math
console.log(calc.percentage(25, 200)); // 12.5
console.log(calc.percentageChange(100, 150)); // 50

// Construction
const slab = calc.concrete(20, 10, 4);
console.log(slab.cubicYards); // 2.47

API Reference

Finance

| Function | Description | |----------|-------------| | mortgage(principal, rate, years) | Monthly mortgage payment, total paid, total interest | | compoundInterest(principal, rate, years, compounds?) | Final amount and total interest earned | | amortization(principal, rate, years) | Full amortization schedule | | roi(gain, cost) | Return on investment percentage | | tip(bill, tipPercent, splitWays?) | Tip amount, total, per person |

Health

| Function | Description | |----------|-------------| | bmi(weightKg, heightCm) | BMI value and category | | bmr(weightKg, heightCm, age, gender) | Basal Metabolic Rate | | tdee(bmrValue, activity) | Total Daily Energy Expenditure | | idealWeight(heightCm, gender) | Ideal weight (4 formulas) |

Math

| Function | Description | |----------|-------------| | percentage(value, total) | Calculate percentage | | percentageChange(old, new) | Percentage change | | gcd(a, b) | Greatest Common Divisor | | lcm(a, b) | Least Common Multiple |

Conversions

calc.convert(value, 'kmToMiles')

Available: kmToMiles, milesToKm, cmToInches, inchesToCm, feetToMeters, metersToFeet, kgToLbs, lbsToKg, ozToGrams, gramsToOz, celsiusToFahrenheit, fahrenheitToCelsius, celsiusToKelvin, kelvinToCelsius, litersToGallons, gallonsToLiters, mlToFlOz, flOzToMl, kphToMph, mphToKph, sqftToSqm, sqmToSqft, acresToHectares, hectaresToAcres

Construction

| Function | Description | |----------|-------------| | concrete(lengthFt, widthFt, depthIn) | Concrete needed (yards, feet, bags) | | paint(areaSqft, coats?, coverage?) | Paint gallons needed |

License

MIT - CalcuFly.com