40% = .4 because % means hundredths. So 40% = 40/100 = .4
Let x be the total number of marbles.
Then, .4x = 24
Divide both sides by .4
x = 60 and 24 is 40% of 60 marbles