First off, what quantities need to be factored in? Voltage and current through the coils, the magnetism of the projectile, the magnetic fields, etc.? Next, how would you calculate the speed of the projectile as it exits the coil gun? Is there an equation? Also, an equation on the force exerted on the projectile would be appreciated.
As many other problems in electromagnetism geometry plays the main role. Therefore the answer to your question depends a lot on the shape of the elements and configuration of your system. There is no general answer and you need to specify this data.
However the work has been done in many simple situations. Barry Hansen has a site about design and construction of coilguns and you can get the FEMM 2D simulator (search google for FEMM, I can't post more links!)for free as well as Octave to do your dynamics. Worry not, FEMM has an example worked out. When you find the FEMM homepage go to "Exmaples" and then to "Lua Scripting Example: Coil Gun".