What determines the strength of a bar magnet? What determines the strength of a bar magnet?  Is it the number (either an absolute number or as a percentage of the total) of electrons that are spinning in the same direction?  Or is it more the amount of polarization of the electrons (i.e. if 50% of the electrons are 100% polarized versus 90% polarized)?   I know there are formulae for the strength of a magnet, but I'd like to know what creates the strength in the first place and if there is a formula to determine this?
 A: The complexities of the materials science aspects of permanent magnet strength do not allow easy prediction of the maximum strength of a given magnet, but here are some general principles.
For a given magnetic material, the most important number is the count of unpaired electron spins contained in the atoms comprising the magnet. More is better, and the so-called rare earth magnets are tops on this list.
The denser that magnetic material is (i.e., the more atoms with unpaired spins we have jammed together per cubic centimeter) the more intense will be the magnetic field at the surface of the magnet- denser is better.
Then we have the net magnetization of the chunk of material, which indicates how many of the electron spins have been aligned into the same direction. Without getting all those spins lined up in parallel, even the best magnet material in the world won't measure up as much of a magnet. 100% alignment is as good as it can get.
Note that the best magnetic materials are not cheap. In practical terms, there are plenty of applications where high-performance magnet material (the rare earth compositions) do not get used, because although a cheaper magnetic material might produce a weaker field, you just make a bigger magnet out of it and the overall result in terms of magnet performance is the same but at lower net cost.
This is why for example almost all audio loudspeakers traditionally use great big (and inexpensive) barium ferrite magnets instead of much smaller (and much more expensive) rare earth magnets. Barium ferrite rules the magnet world where cost is king (and size doesn't matter) whereas the rare earths rule the world where high performance in a tiny package is required (as for example in earbuds and the positioning motors in computer disc hard drives).
Inbetween these extremes you find the so-called Alnico (aluminum-nickel-cobalt) magnet compositions, as popular in electric guitar pickups.
