You have the following information:
- John bought 15 cookies
- John ate 3 of the 15 cookies
In order to calculate the percentage associated to the 3 cookies John ate, respect to the total cookies, you proceed as follow:
Hence, John ate 30% of the total number of cookies.