How to calculate the average running pace?

Hi, so I know that normally, to calculate the average running pace, you would do Time/Distance, so 30 mins/5 miles = an average pace of 6 mins/mi.

However, I'm confused when the distance is 0 and time is greater than 0. The running app on my iPhone, shows at 12 seconds, distance = 0 miles, my avg min/mi is ~ 29:42. How did they calculate this?

My guess is that they're not showing you all the digits that they're keeping track of.

29:42 min/mi = 29.7 min/mi means that in 12 seconds you've gone 0.0067 miles. That's being rounded off to 0 for the display but probably being stored internally.