# How to find Mass fraction by given mass and density

I'm given the following details:

• $m$(salt) = 100g;
• $V$($\ce{H2O}$) = 500ml;
• $D$($\ce{H2O}$) = 1g/ml;

The question is what is the mass fraction of salt in a mix of $\ce{H2O}$ and salt?

In order to find out the answer I first use the formula $$V = \frac{m}{D} \ce{->} m(\ce{H2O}) = 500\text{g}; \quad w(\text{salt}) = \frac{m(\text{salt})}{m(\ce{H2O})+m(\text{salt})}$$

Eventually $w(\text{salt})$ turns out to be 1/6. Are my calculations true ?