Use the formula:
```
mass of KCl = (percentage of solution / 100) × mass of water
```
In this case, the percentage of solution is 40% and the mass of water is 100g.
```
mass of KCl = (40 / 100) × 100g = 40g
```
Step 2: Convert grams of KCl to moles.
Use the molecular weight of KCl (74.55 g/mol) to convert grams to moles.
```
moles of KCl = mass of KCl / molecular weight of KCl
```
```
moles of KCl = 40g / 74.55 g/mol = 0.537 moles
```
Step 3: Calculate the mass of water needed.
Subtract the mass of KCl from the total mass of the solution to get the mass of water.
```
mass of water = mass of solution - mass of KCl
```
```
mass of water = 100g - 40g = 60g
```
Step 4: Prepare the solution.
Add 40g of KCl to 60g of water and stir until it is completely dissolved. This will produce 100g of a 40% solution of potassium chloride.