The inverse degree of a finite graph is defined by where is the degree of in . Erdős . proved that, if is a connected graph of order , then the diameter of is less than . Dankelmann et al. improved this bound by a factor of approximately . We give the sharp upper bounds for trees and unicyclic graphs, which improves the above upper bounds.