It can be hard to know exactly how long your workout will take, but a treadmill actually allows you to make a fairly precise estimate. With a treadmill you can set a speed for your run. If you can maintain this steady speed and you know how far you plan to run, calculating the time it will take you requires nothing more than some basic arithmetic.
Check the speed you're running at on the treadmill. This should be displayed in miles per hour.
Divide the distance of your run in miles by the speed. For instance, if you are running 3 miles at a speed of 5 mph you would divide 3 by 5 to get a time of 0.6 hours.
Convert the time in hours to minutes by multiplying it by 60. For example, you would multiply 0.6 hours by 60 to get 36 -- meaning that at a speed of 5 mph it would take you 36 minutes to run 3 miles.