1.- Weight of the bait, true to a certain point or truth halfways; it doesn 't matter if two baits weight the same, aerodynamics of the bait count a lot. Minnow shaped baits cast like crap.
2.- Rod length, another truth halfways; material, composition of the material, action and power of the rod affect your casting distance. A longer rod may not necessarily means you 'll make longer casts.
3.- Line Type, another truth halfways; material from which the line is made, diameter, friction coeficient count, abrassion resistant nylon mono has a higher friction coeficient than less abrassion resistant nylon mono of the same diameter, therefore it will affect your distance.
4.- How much line in the spool, truth half ways, it 's not the ammount of the line but the shape and design of the spool, in a deep spool reel yes, the ammount of line is important, in a shallow spool it 's the shape of the spool what counts, shallow spools have a lot less capacity.
5 and 6.- Casting TECHNIQUE, the way you stand, the way you handle your rod, the way you move your arm, the way you snap your wrist all that counts.
Aside from those we also have to consider more factors like wind direction, humidity, air temperature, etc.