  We present results for the equation of state in (2+1)-flavor QCD using the
highly improved staggered quark action and lattices with temporal extent
$N_{\tau}=6,~8,~10$, and $12$. We show that these data can be reliably
extrapolated to the continuum limit and obtain a number of thermodynamic
quantities and the speed of sound in the temperature range $(130-400)$ MeV. We
compare our results with previous calculations, and provide an analytic
parameterization of the pressure, from which other thermodynamic quantities can
be calculated, for use in phenomenology. We show that the energy density in the
crossover region, $145~ {\rm MeV} \leq T \leq 163$ MeV, defined by the chiral
transition, is $\epsilon_c=(0.18-0.5)~{\rm GeV}/{\rm fm}^3$, $i.e.$,
$(1.2-3.1)\ \epsilon_{\rm nuclear}$. At high temperatures, we compare our
results with resummed and dimensionally reduced perturbation theory
calculations. As a byproduct of our analyses, we obtain the values of the scale
parameters $r_0$ from the static quark potential and $w_0$ from the gradient
flow.
