I think he wanted to calculate volume, not figure the slope. Or maybe I didn't fully uinderstand the directions you were giving.
Anyway, what you do to calculate volume, and what NorthA The Border might have been getting at, is simple. If their is only one slope, and the box is otherwise square, take the difference between the short & long sides of the slope and average them.
Example - a rectangular box 10x10x10 would have a volume of 1000. but if the back is sloped so that its 10x10 with the top 9 and the bottom 11, you'd just average it out - in this case back to 10x10x10. Another example for good measure (I kill me....

) : if the slope gives you a top measurement of 8 and a bottom of 11, you'd have an average of 9.5 - use that as your depth, multiply length and height normally.