Math is cool isn't it?!?
Actually, you can take this a step, or many steps further with the following equations:
dx/dt = D(xnew - x)
Where dx/dt is the rate of change of any chemical or component in the tank. Xnew is the concentration of that component in the water you are pumping into the tank, and x is the concentration of the component in the water at any time t. D is called the dilution rate, defined as the rate of liquid pumped in divided by the size of the vessel (tank).
If you do a little calculus you can solve the differential equation and come up with the following:
ln [(xnew-x2)/(xnew-x1)] = - D (t2-t1)
Where x2 is the concentration at any time t2, and x1 is the concentration at any time t1.
The following is an example of how you could use the equation. Suppose you measure the magnesium level in your tank and find it low at 1100 ppm. You test your freshly preped Instant Ocean water and find it at 1350 ppm. You decide that you don't feel comfortable with magnesium that low in your tank and decide you want it at least up to 1300 ppm. You set your automatic water change system to 1 gallon per day, and your tank is 100 gallons. D = 0.01/day (I know reciprocal days are hard to comprehend, but don't give up yet!). So how long would it take to get back to 1300 ppm?
ln [(1350-1300)/(1350-1100)] = - 0.01 (t2-t1)
ln means natural log, BTW, you know that button on your calculator you haven't used since 10th grade!. The solution....161 days...wow, long time!
You can assume any rates you like for any of this. How about 10 gallons per day? It would then take 16 days.
All of this of course assumes that the system is well mixed, and that there is no consumption or production in the system (obviously not exactly accurate, but depends on the component). We can add additional terms for consumption and production, but the equations start to become more difficult to solve, and it helps to have accurate ideas of the rates of consumption, etc.
You could also do the calculation if you were worried about the level of some contaminant in your tank. Suppose you dosed with copper and wanted to know how long to get back to a low ?safe? level. Assume copper was at 0.2 ppm (therapeutic dose for ich) and that there was very little, or none in your make up water. How long to get to 0.002 (probably safe for most inverts)? At 10 gallons per day:
ln [(0-0.002)/(0-0.2)] = - 0.1 (t2-t1)
46 days. Of course copper tends to precipitate on things, particularly calcium carbonate sand, so it gets more complex, but anyhow, you get the idea.