In particle physics, the baryon number is an approximate conserved quantum number of a system. It is defined as:
is the number of quarks, and
is the number of antiquarks.
Why one third? According to the laws of strong interaction there cannot be any bare color charge, i.e. the total color charge of a particle has to be zero ('white'), (cf. confinement). This can only be achieved by either putting together a quark of one color with an antiquark of the corresponding anti-color, giving a meson with baryon number zero, by combining three quarks into a baryon with baryon number +1, or by combining three antiquarks into an anti-baryon with baryon number −1. Another possibility is the exotic pentaquark, thought to be found experimentally, which consists of 4 quarks and 1 anti-quark.
Thus, quarks are always present in threes if antiquarks are counted as "negative quarks". Historically, baryon number was defined long before the current model of quarks was established, so rather than changing the definition, particle physicists simply divided the previously known quantum number by three. Nowadays it might be more accurate to speak of the conservation of quark number.
Particles without any quarks or antiquarks have a baryon number of zero. Such particles include leptons, the photon, and the W and Z bosons.
The baryon number is nearly conserved in all interactions of the Standard Model. The loophole is the chiral anomaly. However, sphalerons are not all that common. Electroweak sphalerons can only change the baryon number by 3.
'Conserved' means that the sum of the baryon number of all incoming particles is the same as the sum of the baryon numbers of all particles resulting from the reaction.
A violation of baryon number might lead to proton decay, but only if the baryon number changes by 1.
The still hypothetical idea of grand unified theory allows for the changing of a baryon into a bunch of leptons, thus violating the conservation of baryon and lepton number. Proton decay would be an example of such a process taking place.
* proton decay