We have performed new big bang nucleosynthesis calculations, which employ arbitrarily specified, time-dependent neutrino and antineutrino distribution functions for each of up to four neutrino flavors. We self-consistently couple these distributions to the thermodynamics, the expansion rate, and scale factor-time/temperature relationship, as well as to all relevant weak, electromagnetic, and strong nuclear reaction processes in the early Universe. With this approach, we can treat any scenario in which neutrino or antineutrino spectral distortion might arise. These scenarios might include, for example, decaying particles, active-sterile neutrino oscillations, and active-active neutrino oscillations in the presence of significant lepton numbers. Our calculations allow lepton numbers and sterile neutrinos to be constrained with observationally determined primordial helium and deuterium abundances. We have modified a standard big bang nucleosynthesis code to perform these calculations and have made it available to the community. © 2009 The American Physical Society.