  We present a Bayesian framework to account for the magnification bias from
both strong and weak gravitational lensing in estimates of high-redshift galaxy
luminosity functions. We illustrate our method by estimating the $z\sim8$ UV
luminosity function using a sample of 97 Y-band dropouts (Lyman break galaxies)
found in the Brightest of Reionizing Galaxies (BoRG) survey and from the
literature. We find the luminosity function is well described by a Schechter
function with characteristic magnitude of $M^\star = -19.85^{+0.30}_{-0.35}$,
faint-end slope of $\alpha = -1.72^{+0.30}_{-0.29}$, and number density of
$\log_{10} \Psi^\star [\textrm{Mpc}^{-3}] = -3.00^{+0.23}_{-0.31}$. These
parameters are consistent within the uncertainties with those inferred from the
same sample without accounting for the magnification bias, demonstrating that
the effect is small for current surveys at $z\sim8$, and cannot account for the
apparent overdensity of bright galaxies compared to a Schechter function found
recently by Bowler et al. (2014a,b) and Finkelstein et al. (2014). We estimate
that the probability of finding a strongly lensed $z\sim8$ source in our sample
is in the range $\sim 3-15 \%$ depending on limiting magnitude. We identify one
strongly-lensed candidate and three cases of intermediate lensing in BoRG
(estimated magnification $\mu>1.4$) in addition to the previously known
candidate group-scale strong lens. Using a range of theoretical luminosity
functions we conclude that magnification bias will dominate wide field surveys
-- such as those planned for the Euclid and WFIRST missions -- especially at
$z>10$. Magnification bias will need to be accounted for in order to derive
accurate estimates of high-redshift luminosity functions in these surveys and
to distinguish between galaxy formation models.
