I am calculating the shear and moment for a combined foundation with bi-axial moments on each columns. I got the pressure at 4 corners under the foundation. in order to be able to calculate the sheer and moment, I would like to know how to calculate the volume of pressures under foundation. pressures look like below photo.
If I will be able to calculate the volume of below prism, then things will be easy.
The top side is NOT planar

If the top is not planar, then the best we can do without a decent bit more of information is estimate. As is noted by Martin Westin, this has been answered already.
But to quickly summarize, we basically just average the heights: $h = \frac{h_1+h_2+h_3+h_4}{4}$ and use that as the height of a box. So the volume is: $$V = a\cdot b\cdot h$$ It is a rather good estimate if the top is close to planar. And without doing lots of measuring, I doubt you will be able to get closer to the real value.