How would you calculate the ratio of electric repulsion between two electrons and magnetic attraction? Electrons have both magnetic dipole moments and charge.  Two electrons separated by a distance would repel electrically but it stands to reason they would rotate their spins so their magnetic poles were compatible.  This would create magnetic attraction.  How would you calculate the ratio between the two?
 A: Cute question. The magnetic field of a dipole is
$$B=\frac{k\mu\beta}{c^2}r^{-3},$$
where the unitless factor $\beta$ depends on the direction. Here $\mu$ is the dipole moment, $k$ is the Coulomb constant, $c$ is the speed of light, and $r$ is the distance. Approximating the $g$ factor of the electron as 2, we have
$$\mu=\hbar\frac{e}{m},$$
where $e$ is the fundamental charge and $m$ is the mass. The magnetic potential energy of a dipole in a magnetic field is $U=mB$ (ignoring signs), and the radial force is $F_m=dU/dr$. As a final result, I get
$$\frac{F_e}{F_m}=\frac{c^2m^2}{3\beta\hbar^2}r^2.$$
The unitful factors have to be the way they are because of units. @lineage gave an expression in comments that seems to differ from this by a factor of $2\beta/3$. I don't know for what value of $\beta$ their expression was derived. I believe the maximum radial component of the magnetic field is at $\beta=2$, but I haven't checked that.
If we plug in the Bohr radius, the result is $(1/6)\alpha^{-2}$, where $\alpha$ is the fine structure constant.

Two electrons separated by a distance would repel electrically but it stands to reason they would rotate their spins so their magnetic poles were compatible.

They probably can't do that because of conservation of energy, unless there is some mechanism for dissipation. Assuming that they do, then $\beta=2$.
A: Classically, in SI units, for two electrons each with charge -e separated by distance $r$


*

*magnitude of electrical repulsion is given by $$F_e=\frac{1}{4\pi\epsilon_0}\frac{e^2}{r^2}$$ where symbols have their usual meaning.

*magnetic interaction: depends on the magnetic moments of the two electrons(which stem from its spin angular momentum and charge)


*

*treating them as magnetic dipoles

*assuming the dipoles arrange themselves in the lowest magnetic energy configuration* (both dipole moments parallel to each other and and parallel (or anti-parallel) to $\vec{r}$ )

*then the magnitude of the magntic force is* $F_m=\frac{3 \mu_0} {4\pi}\frac{2 M^2}{r^4}$

*here M is the electron's magnetic moment given in terms of its spin angular momentum $S$ as $M=g \frac{e}{2 m_e}S$ where the $g$-factor depends on the structure of the system(here electron).

*For a free elctron $g\approx2$ and $S=\frac{\sqrt{3}}{2}\hbar$

*therefore $$F_m=\frac{9 \mu_0\hbar^2}{8 \pi m_e^2}\frac{e^2}{r^4}$$
Finally we get $$\frac{F_e}{F_m}=\frac{2}{9}\big(\frac{r}{\lambda_c}\big)^2\approx 1.5\times 10^{24} r^2$$
where electron's (reduced) compton wavelength $\lambda_c=\frac{\hbar}{m_ec}$ 

$*$ For arbitrary magnetic moments the classical force is much more complicated 
$$\vec{F_m}=\frac{3 \mu_0} {4\pi}\frac{1}{r^4}\big((\hat{r}\times \vec{M_1})\times\vec{M_2} +(\hat{r}\times \vec{M_2})\times\vec{M_1}         +5 \hat{r}(\hat{r}\times\vec{M_1}).(\hat{r}\times\vec{M_2})-2\hat{r}\vec{M_1}.\vec{M_2}\big)$$  For the lowest energy config, all cross products cancel leaving only the last term.
