The formula with 4 substituted
miles = 4 ÷ 1.609344 = 2.485
The constant is an exact definition, not a rounded factor: the mile is 1.609344 km, the US gallon is 3.785411784 litres and the imperial gallon is 4.54609 litres. The Kilometres to Miles Converter explains where each comes from and gives a longer table.
At a walking pace of 5 km/h, 4 km takes about 48 minutes. At an easy running pace of 10 km/h it takes about 24. In metres it is 4,000.
What 4 kilometres means in practice
4 km is 2.49 miles, near enough two and a half. It is ten laps of a track and about 48 minutes on foot, and a reasonable target for a first run-walk session that builds towards a 5K.