The main purpose of this paper is to study extremal results on the intersection graphs of boxes in Rd. We calculate exactly the maximal number of intersecting pairs in a family \F of n boxes in Rd with the property that no k+1 boxes in \F have a point in common. This allows us to improve the known bounds for the fractional Helly theorem for boxes. We also use the Fox-Gromov-Lafforgue-Naor-Pach results to derive a fractional Erdős-Stone theorem for semi-algebraic graphs in order to obtain a second proof of the fractional Helly theorem for boxes.