Skip to content

ebalderasr/MolarPrep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MolarPrep

Stock solution and molarity preparation for laboratory workflows

MolarPrep

β†’ Open the live app


Stack Focus License Part of


What is MolarPrep?

MolarPrep is a browser-based solution preparation calculator that covers the two most common reagent setup scenarios in a laboratory: weighing a dry solid to a target molarity, and pipetting the right volume from a liquid stock defined by density and purity.

Both modules handle unit scaling automatically and validate inputs before computing, so the result is always expressed in a practical unit without manual prefix conversion.

No installation. No server. Runs entirely in the browser.


Why it matters

Preparing stock solutions involves multi-step unit conversions that are a frequent source of errors β€” especially under time pressure or when working across concentration scales (M, mM, Β΅M, nM). Without a dedicated tool:

  • Mass calculations require manually converting target molarity and volume into consistent units before applying m = M Γ— V Γ— MW
  • Liquid reagent preparation involves a two-step calculation (density + purity β†’ stock molarity, then C₁V₁ = Cβ‚‚Vβ‚‚) that is commonly collapsed or done incorrectly
  • The appropriate output unit (g, mg, Β΅g / L, mL, Β΅L) must be chosen by the user, introducing another judgment call

MolarPrep handles all conversions internally and selects the output prefix automatically based on scale.


How it works

Module 1 β€” Solid reagent (mass to weigh)

Enter the target molarity, final volume, and molecular weight. MolarPrep returns the mass to weigh out.

Formula

$$m \ (\text{g}) = M \left(\frac{\text{mol}}{\text{L}}\right) \times V \ (\text{L}) \times MW \left(\frac{\text{g}}{\text{mol}}\right)$$

Supported molarity units: M, mM, Β΅M, nM. Supported volume units: L, mL. Output is auto-scaled to g, mg, or Β΅g depending on magnitude.

Module 2 β€” Liquid reagent (concentrated stock volume)

Use this when the reagent is a liquid sold by density and purity (e.g. acids, organic solvents). Enter density, purity, molecular weight, target molarity, and final volume.

Step A β€” Estimate stock molarity from density and purity

$$M_1 = \frac{P \times \rho \times 1000}{MW}$$

where P = purity fraction (e.g. 0.98), ρ = density in g/mL, MW = molecular weight in g/mol.

Step B β€” Apply dilution equation

$$V_1 = \frac{M_2 \times V_2}{M_1}$$

Output is auto-scaled to L, mL, or Β΅L.

Output validation

Non-positive or missing values return ERR. All outputs are checked for physical consistency before display.


Features

Solid reagent module Computes mass to weigh from molarity, volume, and MW
Liquid reagent module Estimates stock molarity from density and purity, then solves C₁V₁ = Cβ‚‚Vβ‚‚
Auto unit scaling Output switches between g/mg/Β΅g and L/mL/Β΅L based on magnitude
Input validation Non-positive or missing values return ERR before computing
Offline-first PWA Service Worker caches all assets; works without internet after first load
Bilingual UI Full Spanish / English interface
No installation Opens instantly in any modern browser; installable on Android, iOS, and desktop

Tech stack

Frontend

HTML5 CSS3 JavaScript

Deployment

GitHub Pages PWA

Fully static β€” no backend, no framework, no build step.


Project structure

MolarPrep/
β”œβ”€β”€ index.html              ← markup only
β”œβ”€β”€ manifest.json           ← PWA manifest
β”œβ”€β”€ sw.js                   ← Service Worker (cache-first, offline support)
β”œβ”€β”€ icon-192.png
β”œβ”€β”€ icon-512.png
β”œβ”€β”€ icon-maskable-192.png
β”œβ”€β”€ icon-maskable-512.png
β”œβ”€β”€ og-image.png            ← Open Graph social preview
└── src/
    β”œβ”€β”€ css/
    β”‚   └── app.css         ← all styles
    └── js/
        β”œβ”€β”€ i18n.js         ← translation strings (ES / EN)
        └── app.js          ← all application logic

Author

Emiliano Balderas RamΓ­rez Bioengineer Β· PhD Candidate in Biochemical Sciences Instituto de BiotecnologΓ­a (IBt), UNAM

LinkedIn Email


Related

DiluteIt β€” universal dilution solver (C₁V₁ = Cβ‚‚Vβ‚‚) for any of the four variables.

CellSplit β€” Neubauer cell counting and passage planning for CHO cultures.

PulseGrowth β€” growth kinetics and metabolic rate estimation for mammalian cell culture.

CellBlock β€” shared biosafety cabinet scheduling for cell culture research groups.


MolarPrep β€” enter your target, get your mass or volume.

About

πŸ§ͺ PWA for molarity calculations, stock solution prep, and dilution planning in laboratory workflows. Part of the Host Cell Lab Suite.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors