We don't know.
I assume you are referring to Disney's Aladdin. The scene in question is a montage. We're not shown every place they went to, and the passage of time between the areas is thus very difficult to gauge.
MoviePilot did remark:
While Aladdin and Jasmine take their romantic ride together they
somehow manage to travel from Cairo to Athens in under one second.
That's around 1100 kilometers!! Travelling that far at such speed
would apply around 99 million newtons of force!
So...even if Aladdin and Jasmine could manage to hold onto the carpet,
their skin should have been torn from their bones. Hmm, suddenly
that's not sounding so romantic...
So, it's basically impossible to gauge their total distance travelled and their overall ground speed (which, as the analysis above shows, is certainly Physics-defying).
Ultimately it's an animated, fun film and this is magic - so the realism was irrelevant to Disney and wasn't focussed on.