Enrol in a course of electrical engineering.
Or
Search YouTube for step by step instructions by someone who has already done the calculations.
Or
You can start by studying a simple electromagnet. By knowing the physical shape of a magnetic core (Generally iron), the magnetic characteristics or the core iron and the dimensions of the magnetic circuit (iron plus air gap) you may determine the maximum usable Amp-Turns.
From that, you may determine the flux density and the attractive force of the electromagnet under steady state DC current..
Applying that to a motor application gets a lot more complicated.
--------------------
Ohm's law
Not just a good idea;
It's the LAW!