Every volume unit here is stored as an exact number of litres. The tool turns your amount into litres and then into the unit you picked, so every pair of units agrees with every other pair.
There are two gallons in common use. The US gallon is 3.785411784 litres (231 cubic inches). The UK imperial gallon is 4.54609 litres, about 20 percent larger. A US gallon is 128 US fluid ounces, 16 cups or 8 pints. A UK gallon is 160 UK fluid ounces and 8 UK pints. When a label, a car or a recipe says gallon, check which country it comes from before you convert.
The US fluid ounce is 29.5735295625 ml and the UK fluid ounce is 28.4130625 ml. This tool uses the US cup (236.5882365 ml, 8 US fluid ounces), not the 250 ml metric cup used in some countries.
Fluid ounces here measure volume. They are not the same as ounces of weight, so ml to oz only works for liquids if you mean fluid ounces. The grams to ounces converter handles weight.
Check it by hand: divide litres by 3.78541 for US gallons. 10 L ÷ 3.78541 = 2.6417 US gal. For UK gallons divide by 4.54609, which gives 2.1997. 10 L is 10,000 ml, and 10,000 ÷ 236.588 = 42.27 US cups.