When two dice are thrown, the total number of outcomes is:
\[
6 \times 6 = 36.
\]
The possible outcomes that give a sum of 7 are:
\[
(1,6), (2,5), (3,4), (4,3), (5,2), (6,1),
\]
which are 6 outcomes. Therefore, the probability of getting a sum of 7 is:
\[
P(\text{sum 7}) = \frac{6}{36} = \frac{1}{6}.
\]