Actually you don't need to calculate the size of the tank. All you need to know is how much delta V you want from the stage and then shape the fuel tank to your liking. For example, you have a payload + upper stage (and engine of course). Stick a mechjeb on, it will show you the masses, TWR and Delta-V. If you need more delta V, just drag the tank to make it a little bigger. If you drop below the needed TWR, then you need a stronger engine or a third stage. If you need better efficiency, try something with better Isp... Does this answer your question or I've misunderstood.