This paper suggests a novel method for a mobile robot to plan its path towards a target through an unknown environment, using sensors to discover new obstacles along the way. The method synthesizes an artificial temperature gradient throughout the known environment by numerically solving the heat conduction partial differential equation, where obstacles encountered during the robot navigation are “hot” and the target is “cold.” The temperature at all other points on the known environment grid are computed numerically, and are continuously updated to account for new obstacles. This method ensures the creation of navigational potential field with no danger of being trapped in local minima. A computer simulation demonstrates the technique on several environment types. In addition, an experiment was conducted on a mobile robot that can navigate indoors and outdoors in real time using this method. The simulations and experiment show that the temperature gradient method is robust in its ability to find paths, and is practical for online sensor based navigation of mobile robots.