Calculate Molarity

Molarity Calculator

Calculate the molar concentration of a solution

The concentration of your solution is:

How to Calculate Molarity

Molarity (M) is the standard unit of concentration used in chemistry to describe how much of a substance (solute) is dissolved in a specific volume of liquid (solvent). It is defined as the number of moles of solute per liter of solution.

The Molarity Formula

M = n / V

Where:

  • M = Molarity (mol/L)
  • n = Moles of solute (mass / molar mass)
  • V = Volume of solution in Liters

Steps to Calculate Concentration

  1. Determine the mass: Weigh the amount of solute you are using in grams.
  2. Find the molar mass: Sum the atomic weights of all atoms in the chemical formula (found on the periodic table).
  3. Measure the volume: Record the final volume of the solution in milliliters (mL).
  4. Apply the conversion: Since molarity uses liters, the formula becomes:
    M = (Mass / Molar Mass) / (Volume in mL / 1000)

Practical Example

Suppose you dissolve 5.84 grams of Table Salt (NaCl) into enough water to make 500 mL of solution.

  • Mass of NaCl = 5.84g
  • Molar Mass of NaCl = 58.44 g/mol
  • Volume = 500 mL (which is 0.5 Liters)
  • Calculation: (5.84 / 58.44) / 0.5 = 0.1 / 0.5 = 0.2 M
function calculateMolarity() { var mass = parseFloat(document.getElementById('soluteMass').value); var molarMass = parseFloat(document.getElementById('molarMass').value); var volumeMl = parseFloat(document.getElementById('solutionVolume').value); var resultDiv = document.getElementById('molarityResult'); var valueDiv = document.getElementById('molarityValue'); var detailDiv = document.getElementById('molarityDetail'); if (isNaN(mass) || isNaN(molarMass) || isNaN(volumeMl) || mass <= 0 || molarMass <= 0 || volumeMl <= 0) { alert("Please enter valid positive numbers for all fields."); resultDiv.style.display = "none"; return; } // Convert mL to L var volumeL = volumeMl / 1000; // Calculate moles var moles = mass / molarMass; // Calculate molarity (M = n / V) var molarity = moles / volumeL; // Display result valueDiv.innerHTML = molarity.toFixed(4) + " mol/L (M)"; detailDiv.innerHTML = "Total Moles: " + moles.toFixed(4) + " mol | Volume: " + volumeL.toFixed(4) + " L"; resultDiv.style.display = "block"; resultDiv.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }

Leave a Comment