Choose your ratio. As a newbie, I used 16:1 as the kit manual said. Most people recommend less oil than that now.
In any case, a gallon is 128 ounces, so if you want 16:1, just divide 128/16=8 ounces oil to 1 gallon of gasoline.
If you want 32:1 it's 128/32 = 4 ounces oil.
40:1 is 3.2 ounces, which is why you'll see 3.2 ounce bottles of oil in the 2-stroke oil section. You pour the 3.2 ounce bottle in a gasoline container, and then add 1 gallon at the pump and you're done. But you don't want 40:1 for break-in.
This would be an easy way to get a 20:1 mix, which might be a good break-in ratio. Buy the 40:1 oil and only add 1/2 gallon of gasoline.
Or buy a 6.4 oz bottle of oil and add 1 gallon of fuel.
I hope that made sense. In any case determine the oil you need and buy that amount and use the whole bottle. Then you only have to measure the gasoline, which is easy to do at the pump. Doing it this way helps mix it as well.