We consider the shortest paths between all pairs of nodes in a directed or undirected complete graph with edge lengths which are uniformly and independently distributed in left bracket 0, 1 right bracket . We show that the longest of these paths is bounded by c log n/n almost surely, where c is a constant and n is the number of nodes. Our bound is the best possible up to a constant. We apply this result to some well-known problems and obtain several algorithmic improvements over existing results. Our results hold with obvious modifications to random (as opposed to complete) graphs and to any distribution of weights whose density is positive and bounded from below at a neighborhood of zero. As a corollary of our proof we get a new result concerning the diameter of random graphs.