The entropy for two-dimensional black holes is obtained through the entropy function with the condition that the geometry approaches an AdS2 spacetime in the near horizon limit. It is shown that the entropy is universal and proportional to the value of the dilaton field at the event horizon as expected. We find this universal behavior holds even after the inclusion of higher derivative terms, only modifying the proportional constant. More specifically, a variety of models of the dilaton gravity in two dimensions are considered, in which it is shown that the universal entropy coincides with the well-known results in the previous literatures.