When I run on the treadmill, I get my distance / pace off a calibrated Stryd footpod. I did my calibration at a track and typically split right on the mile markers in races. On the treadmill, I noticed that most really nice gym or hotel treadmills will agree with my Stryd consistently within +/- 1 second per mile. However, cheaper treadmills are always roughly 10-30 seconds per mile off and I've seen it off in both directions (some treadmills are faster than reported, others are slower). The most extreme case I saw was a cheap POS treadmill at family members house that was a full 70 seconds per mile off. I've just gotten into the habit of completely ignoring the treadmill display and just trusting my footpod. My footpod pace/HR and pace/perceived effort always seems to agree.
Another thing I noticed, is that many treadmills will speed up slightly over time as they warm up at the same speed setting.