peptide-calc
v1.0.0
Published
Dependency-free reconstitution, dilution and molarity calculators for research peptides. For in vitro laboratory use.
Maintainers
Readme
🧪 peptide-calc — Peptide Research Calculators
Small, dependency-free JavaScript library for the everyday maths of preparing research-peptide solutions in the lab — reconstitution / dilution and molarity / concentration — plus a self-contained web calculator you can run in the browser.
▶️ Live calculator: https://paulnocturne.github.io/rsbiolabs-peptide-tools/
Maintained by RS Bio Labs · more tools at https://rsbiolabs.com/tools · background reading in the Knowledgebase.
⚠️ For in vitro research use only
This library performs standard laboratory arithmetic (concentration, dilution, molarity). It is not dosing software and provides no medical or veterinary guidance. Molecular weights should always be confirmed against your compound's Certificate of Analysis.
Install
npm install peptide-calcOr drop src/peptide-calc.js straight into a page — it's a
single ES module with zero dependencies.
Usage
import { reconstitution, molarity, MW } from 'peptide-calc';
// Reconstitution: 10 mg vial + 2 ml diluent, want to draw 250 mcg
reconstitution(10, 2, 250);
// → { mgPerMl: 5, mcgPerMl: 5000, drawMl: 0.05, units: 5 }
// i.e. 5 mg/ml, draw 0.05 ml = 5 units on a U-100 syringe
// Molarity: 10 mg of retatrutide in 2 ml
molarity(10, 2, MW.retatrutide);
// → { molPerL: 0.001057, mM: 1.057, uM: 1056.8, mgPerMl: 5 }API
| Function | Returns |
|---|---|
| concentration(mg, ml) | { mgPerMl, mcgPerMl } |
| drawVolume(targetMcg, mcgPerMl) | ml to draw |
| syringeUnits(ml, unitsPerMl = 100) | volume in syringe units (U-100 default) |
| reconstitution(mg, ml, targetMcg, unitsPerMl = 100) | { mgPerMl, mcgPerMl, drawMl, units } |
| molarity(massMg, volMl, mwGmol) | { molPerL, mM, uM, mgPerMl } |
| MW | frozen table of approximate reference molecular weights (g/mol) |
All numeric inputs must be finite and > 0; invalid input throws a RangeError.
The maths
mg/ml = mg ÷ ml
mcg/ml = mg/ml × 1000
draw (ml) = target_mcg ÷ mcg/ml
units = ml × unitsPerMl (U-100 → ×100)
molarity = mass_mg ÷ (MW_g/mol × volume_ml) [mol/L] · mM = ×1000 · µM = ×1e6Develop
npm test # runs the node:test suite (no dependencies)Contributing
Issues and PRs welcome — especially additional verified molecular weights (with a source) and new lab-maths helpers. Please keep the library dependency-free.
License
MIT © RS Bio Labs. Built and maintained by the team at rsbiolabs.com — UK research peptides. Questions: [email protected].
