This article needs additional citations for verification. (July 2013) (Learn how and when to remove this template message)
where nq is the number of quarks, and nq is the number of antiquarks. Baryons (three quarks) have a baryon number of +1, mesons (one quark, one antiquark) have a baryon number of 0, and antibaryons (three antiquarks) have a baryon number of −1. Exotic hadrons like pentaquarks (four quarks, one antiquark) and tetraquarks (two quarks, two antiquarks) are also classified as baryons and mesons depending on their baryon number.
Baryon number vs. quark number
Quarks carry not only electric charge, but also charges such as color charge and weak isospin. Because of a phenomenon known as color confinement, a hadron cannot have a net color charge; that is, the total color charge of a particle has to be zero ("white"). A quark can have one of three "colors", dubbed "red", "green", and "blue"; while an antiquark may be either anti-red, anti-green or anti-blue.
For normal hadrons, a white color can thus be achieved in one of three ways:
- A quark of one color with an antiquark of the corresponding anticolor, giving a meson with baryon number 0,
- Three quarks of different colors, giving a baryon with baryon number +1,
- Three antiquarks of different anticolors, giving an antibaryon with baryon number −1.
The baryon number was defined long before the quark model was established, so rather than changing the definitions, particle physicists simply gave quarks one third the baryon number. Nowadays it might be more accurate to speak of the conservation of quark number.
In theory, exotic hadrons can be formed by adding pairs of quarks and antiquarks, provided that each pair has a matching color/anticolor. For example, a pentaquark (four quarks, one antiquark) could have the individual quark colors: red, green, blue, blue, and antiblue. In 2015, the LHCb collaboration at CERN reported results consistent with pentaquark states in the decay of bottom Lambda baryons (Λ0
Particles not formed of quarks
Particles without any quarks have a baryon number of zero. Such particles are
- leptons — the electron, muon, tauon, and their corresponding neutrinos
- vector bosons — the photon, W and Z bosons, gluons
- Higgs boson — the only known fundamental scalar boson
- graviton — a hypothetical tensor boson
The baryon number is conserved in all the interactions of the Standard Model, with one possible exception. '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. The one exception is the hypothesized Adler–Bell–Jackiw anomaly in electroweak interactions;  however, sphalerons are not all that common and could occur at high energy and temperature levels and can explain electroweak baryogenesis and leptogenesis. Electroweak sphalerons can only change the baryon and/or lepton number by 3 or multiples of 3 (collision of three baryons into three leptons/antileptons and vice versa). No experimental evidence of sphalerons has yet been observed.
The hypothetical concepts of grand unified theory (GUT) models and supersymmetry allows for the changing of a baryon into leptons and antiquarks (see B − L), thus violating the conservation of both baryon and lepton numbers. Proton decay would be an example of such a process taking place, but has never been observed.
However, the conservation of Baryon number is not consistent with the physics of Black Hole evaporation via Hawking Radiation. It is expected in general that quantum gravitational effects violate the conservation of all charges associated to global symmetries. 
R. Aaij et al. (LHCb collaboration) (2015). "Observation of J/ψp resonances consistent with pentaquark states in Λ0
b→J/ψK−p decays". Physical Review Letters. 115 (7): 072001. arXiv:1507.03414. Bibcode:2015PhRvL.115g2001A. doi:10.1103/PhysRevLett.115.072001. PMID 26317714. S2CID 119204136.
- G. ’t Hooft, "Symmetry breaking through Bell-Jackiw anomalies", Phys. Rev. Lett. 37 (1976) 8
- Griffiths, David (2008). Introduction to Elementary Particles (2nd ed.). New York: John Wiley & Sons. p. 77. ISBN 9783527618477.
- Harlow, Daniel and Ooguri, Hirosi", "Symmetries in quantum field theory and quantum gravity", hep-th 1810.05338 (2018)
- Kallosh, Renata and Linde, Andrei D. and Linde, Dmitri A. and Susskind, Leonard", "Gravity and global symmetries", Phys. Rev. D 52 (1995) 912-935