Dividing the amount of red paint by the total amount gives you a fraction equal to 40 percent.


"Select the bars to show how much of the gallon is red paint"
Count the total number of bars available to fill out/select, then multiply your total by 0.4 and fill out/select the corresponding number of bars to represent the amount of red paint.