well you could subtract for the sand, say if your tank is 48 long and 24 front to back and the sand is an average of 2 inches deep, then you could estimate that the sand is displacing (48*24*2)/231= 9.97 gallons.
understand that the sand dosent displace all the water, cause the water can fit in the cracks between the grains, so i would guess with the #'s above that the sand is actually displacing something more like 7-8 gallons... give or take.
as for the rock, its about the same process, estimate the size of the rock, figure its volume witht he above posted formula, and then subtract that from the tank volume...
its not gonna be ultra precise ofcourse, but it'll give you an idea..