1. Calculate the molar mass of NaCl:
M_{NaCl} = 22.990 + 35.453 = 58.443 \, \text{g/mol}
2. Calculate the number of moles of NaCl:
n = \frac{5.0 \, \text{g}}{58.443 \, \text{g/mol}} = 0.08555 \, \text{mol}
3. Convert volume from mL to L:
V = \frac{500 \, \text{mL}}{1000} = 0.5 \, \text{L}
4. Calculate the molarity:
M = \frac{n}{V} = \frac{0.08555 \, \text{mol}}{0.5 \, \text{L}} = 0.1711 \, \text{M}
Answer: Molarity of the NaCl solution is 0.171\,\text{M}