Le Chatelier’s principle states that when a system is disturbed, it will shift its equilibrium to counteract the disturbance. However for a chemical reaction in a small, confined system, the probability of observing it proceed in the opposite direction to that predicted by Le Chatelier’s principle, can be significant. This work gives a molecular level proof of Le Chatelier’s principle for the case of a temperature change. Moreover, a new, exact mathematical expression is derived that is valid for arbitrary system sizes and gives the relative probability that a single experiment will proceed in the endothermic or exothermic direction, in terms of a microscopic phase function. We show that the average of the time integral of this function is the maximum possible value of the purely irreversible entropy production for the thermal relaxation process. Our result is tested against computer simulations of the unfolding of a polypeptide. We prove that any equilibrium reaction mixture on average responds to a temperature increase by shifting its point of equilibrium in the endothermic direction.