How to calculate the repulsion force between two electromagnets

Hi I'm new here and I have ( I hope ) few simple questions. I'm interested how to calculate (in newtons) the repellent force between two electromagnets facing the same poles at a distance(if is it even possible). I would like to produce the repellent force of around 300 N and all that connected to a 4.5 V battery.

• The figure 4.5 Volts and 300N seems a little impractical to me, because the relation is current based and your input is pretty low. – MaMba Sep 14 '15 at 14:11

For a straight forward solenoid you have this for the attractive force: -

Force = $\dfrac{(amps\cdot turns)^2\cdot \mu_0\cdot A}{2\cdot g^2}$ newtons

Where

• A is cross sectional area of the solenoid (metres squared)
• g is gap between end of solenoid and "thing" to be attracted (metres)
• $\mu_0$ is 4$\pi$ x $10^{-7}$

Where the "thing" is in fact another solenoid, identical to the first and generating the same pole the force of repulsion will be doubled.

Here is a calculator for the above formula that saves a bit of work.