The formula to calculate zcash profitability is not so different from other cryptocoins based on proof of work implementation, especially the ones using the same algorithm, Equihash. Regardless the proof of work algorithm, most of the crypto currencies mining work practically in the same way. This is why zcash mining calculator is based on ethereum mining calculator and most of parameters are the same.
For the begining we need to know the network blocktime and the network hashrate. We also know our miner hashrate for which we want to calculate the profitability. Considering those factors, we can estimate how many seconds we need in order to find a block. We can see that the network is (network_hashrate / miner_hashrate) faster than our miner. The formula based on a simple fact. If the whole network needs the network block time to mine a block, we can assume our miner needs the block timer multiplied by the slowness factor of our miner:
miner_block_time = block_time * network_hashrate / miner_hashrate;
Now that we know how much time we need to discover a block, based on our hashrate, we know that each time that happens we are rewarded with the block_reward amount. For zcash that is 10 ZEC. So on avarage, every miner_blocktime second we earn 10 ZEC. From here we can see how much we can mine every day/month.year:
zec_per_hour = block_reward * miner_block_time / 3600;
zec_per_day = block_reward * miner_block_time / ( 3600 * 24 );