  We constrain the neutrino mass in $f(R)$ gravity using the latest
observations from the Planck, BAO and BICEP2 data. We find that the measurement
on the B-modes can break the degeneracy between the massive neutrinos and the
$f(R)$ gravity. We find a non-zero value of the Compton wavelengths $B_{0}$ at
a $68\%$ confidence level for the $f(R)$ model in the presence of massive
neutrinos when the BICEP2 data is used. Furthermore, the tension on the
tensor-to-scalar ratios between the measured values from Plank and BICEP2 is
significantly reconciled in our model.
