  Boron carbide (B$_4$C) is of both fundamental scientific and practical
interest in inertial confinement fusion (ICF) and high energy density physics
experiments. We report the results of a comprehensive computational study of
the equation of state (EOS) of B$_4$C in the liquid, warm dense matter, and
plasma phases. Our calculations are cross-validated by comparisons with
Hugoniot measurements up to 61 megabar from planar shock experiments performed
at the National Ignition Facility (NIF). Our computational methods include path
integral Monte Carlo, activity expansion, as well as all-electron Green's
function Korringa-Kohn-Rostoker and molecular dynamics that are both based on
density functional theory. We calculate the pressure-internal energy EOS of
B$_4$C over a broad range of temperatures
($\sim$6$\times$10$^3$--5$\times$10$^8$ K) and densities (0.025--50
g/cm$^{3}$). We assess that the largest discrepancies between theoretical
predictions are $\lesssim$5% near the compression maximum at 1--2$\times10^6$
K. This is the warm-dense state in which the K shell significantly ionizes and
has posed grand challenges to theory and experiment. By comparing with
different EOS models, we find a Purgatorio model (LEOS 2122) that agrees with
our calculations. The maximum discrepancies in pressure between our
first-principles predictions and LEOS 2122 are $\sim$18% and occur at
temperatures between 6$\times$10$^3$--2$\times$10$^5$ K, which we believe
originate from differences in the ion thermal term and the cold curve that are
modeled in LEOS 2122 in comparison with our first-principles calculations. In
addition, we have developed three new equation of state models and applied them
to 1D hydrodynamic simulations of a polar direct-drive NIF implosion,
demonstrating that these new models are now available for future ICF design
studies.
