GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - computerdude11111/medical-calculator-formulas: Open-source medical calculator formulas and clinical scoring systems. Reference implementations for eGFR, BMI, MELD, CHA₂DS₂-VASc, A1C, and 100+ more. Used by mdtools.org.

BranchesTags
Open more actions menu

Latest commit

 

History

2 Commits
2 Commits

Folders and files

NameName
Last commit message
Last commit date
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Medical Calculator Formulas

A comprehensive, open-source collection of medical calculator formulas and clinical scoring systems implemented in JavaScript. These are the reference implementations used by MDTools.org.

Why This Exists

Medical formulas are published in peer-reviewed literature, but finding clean, verified implementations can be difficult. This repository provides:

  • Verified implementations of common clinical formulas
  • Source citations for each formula
  • Unit handling (SI and conventional units)
  • Edge case documentation (when formulas break down)

Included Formulas

Nephrology

  • eGFR (CKD-EPI 2021) — Calculator | Formula Source
  • Creatinine Clearance (Cockcroft-Gault) — Calculator
  • FENa (Fractional Excretion of Sodium) — Calculator
  • Free Water Deficit — Calculator
  • Sodium Correction for Hyperglycemia — Calculator

Cardiology

  • CHA₂DS₂-VASc Score — Calculator
  • HEART Score — Calculator
  • TIMI Risk Score — Calculator
  • HAS-BLED Score — Calculator
  • QTc (Bazett, Fridericia, Framingham) — Calculator
  • ASCVD Risk Estimator — Calculator
  • Corrected QT Interval — Calculator

Hepatology

  • MELD Score (MELD 3.0) — Calculator
  • Child-Pugh Score — Calculator
  • FIB-4 Index — Calculator

Pulmonology

  • A-a Gradient — Calculator
  • CURB-65 — Calculator
  • Wells Score (PE) — Calculator
  • Wells Score (DVT) — Calculator
  • PSI/PORT Score — Calculator

Neurology

  • Glasgow Coma Scale (GCS) — Calculator
  • NIH Stroke Scale (NIHSS) — Calculator
  • Canadian CT Head Rule — Calculator

Emergency / Critical Care

  • SOFA Score — Calculator
  • qSOFA — Calculator
  • Parkland Formula (Burns) — Calculator
  • Braden Scale — Calculator
  • CIWA-Ar — Calculator
  • RASS — Calculator
  • CAM-ICU — Calculator

Hematology

  • Absolute Neutrophil Count (ANC) — Calculator
  • Corrected Reticulocyte Count — Calculator
  • Transferrin Saturation — Calculator

General / Nutrition

  • BMI Calculator — Calculator
  • BSA (Body Surface Area) — Calculator
  • Ideal Body Weight — Calculator
  • TDEE (Total Daily Energy Expenditure) — Calculator
  • Calorie Calculator — Calculator

Drug Dosing

  • Vancomycin AUC — Calculator
  • Heparin Dosing — Calculator
  • Warfarin Dose — Calculator
  • Insulin Dose — Calculator
  • Semaglutide Dosing — Calculator
  • Ketamine Dose — Calculator
  • Lidocaine Dose — Calculator

Endocrinology

  • A1C ↔ Average Glucose — Calculator
  • Corrected Calcium — Calculator

Usage

Each formula is implemented as a standalone JavaScript function. Example:

// eGFR (CKD-EPI 2021)
function calculateEGFR(creatinine, age, sex) {
  // Sex: 'female' or 'male'
  const kappa = sex === 'female' ? 0.7 : 0.9;
  const alpha = sex === 'female' ? -0.241 : -0.302;
  const mult  = sex === 'female' ? 1.012 : 1.0;

  const min = Math.min(creatinine / kappa, 1);
  const max = Math.max(creatinine / kappa, 1);

  return 142 * Math.pow(min, alpha) * Math.pow(max, -1.200) * Math.pow(0.9938, age) * mult;
}

// BMI
function calculateBMI(weightKg, heightCm) {
  const heightM = heightCm / 100;
  return weightKg / (heightM * heightM);
}

// Corrected Calcium
function correctedCalcium(totalCalcium, albumin) {
  return totalCalcium + 0.8 * (4.0 - albumin);
}

Try These Calculators

All formulas are available as free, interactive calculators at MDTools.org — no sign-up required.

  • 🌐 English: mdtools.org
  • 🇩🇪 German: mdtools.org/de/

Contributing

Found an error? Have a formula to add? Open an issue or submit a PR.

References

  • Inker LA, et al. New Creatinine- and Cystatin C-Based Equations to Estimate GFR. NEJM. 2021;385(19):1737-1749.
  • Lip GYH, et al. Refining clinical risk stratification for predicting stroke and thromboembolism in atrial fibrillation. Chest. 2010;137(2):263-272.
  • Kamath PS, et al. A model to predict survival in patients with end-stage liver disease. Hepatology. 2001;33(2):464-470.
  • Nathan DM, et al. Translating the A1C assay into estimated average glucose values. Diabetes Care. 2008;31(8):1473-1478.

License

MIT — see LICENSE


MDTools.org — Free clinical tools for healthcare professionals.

About

Open-source medical calculator formulas and clinical scoring systems. Reference implementations for eGFR, BMI, MELD, CHA₂DS₂-VASc, A1C, and 100+ more. Used by mdtools.org.

mdtools.org

Topics

bmi-calculatorclinical-calculatorsclinical-scoringegfrevidence-based-medicinehealthcarejavascriptmedical-educationmedical-formulasmedical-referencemeld-scoreopen-source

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.