Click on the backdrop for the code. Change the damage, fire rate, and range values to whatever you want and it'll tell you how much it would cost in game. Keep in mind this doesn't take special abilities into account. For example, for Surgeon I added 50% onto it's damage in the calculation to balance it.
The balancing system for the game, been in use since the beginning. It's not perfect however. Most notably when it goes over 50 range on a tower it doesn't add to the value, which is something that's been in thought how to alter yet still keeping the game feeling the same way.