spears are defensive troops, so they are more powerful in defense than offense. There are many factors that affect the outcome. Spears are powerful defending against cavalry for instance, but will be wiped out by infantry. The opposite is true for swords who can hold off infantry but will be over-run by cavalry. The wall, basic defence, and luck also play a part.
For more info on unit stats
Clicky!
You can play around with the numbers in the Simulator. It can be found at the Rally Point, or if you are logged in to us3 by
Clicky!