Unit content
Molarity and molar concentration
For many chemical calculations, the most useful way to describe a solution is the amount of solute per volume of final solution.
The molar concentration, commonly called molarity, of a solute is
$$c=\frac{n_{\mathrm{solute}}}{V_{\mathrm{solution}}}.$$
Its common unit is moles per liter. The notation $\mathrm M$ is widely used as shorthand:
$$1,\mathrm M=1,\mathrm{mol/L}.$$
Here $c$ denotes concentration. The symbol $M$ used elsewhere for molar mass is a different quantity; context and units distinguish them.
Rearranging the definition gives
$$n=cV,$$
which converts a measured solution volume directly into amount of solute.
Example
Suppose $5.844,\mathrm g$ of sodium chloride, $\mathrm{NaCl}$, is dissolved and the final solution volume is adjusted to $0.5000,\mathrm L$. With molar mass
$$M_{\mathrm{NaCl}}=58.44,\mathrm{g/mol},$$
the amount of solute is
$$n=\frac{5.844}{58.44}=0.1000,\mathrm{mol}.$$
Therefore
$$c=\frac{0.1000}{0.5000}=0.2000,\mathrm{mol/L}=0.2000,\mathrm M.$$
The denominator is the volume of the completed solution, not the initial volume of solvent. Dissolving a solid can change the volume, so adding solute to $500,\mathrm{mL}$ of water does not necessarily produce exactly $500,\mathrm{mL}$ of solution.
Molarity is convenient because reaction equations relate amounts in moles while laboratory liquids are often measured by volume. It is temperature dependent because solution volume changes with temperature even when the amount of solute does not.