How to determine if the formula of my shape is correct? (the formula is found through integration)

For example, I have a pyramid with a rectangle base. The base is represented by 2b by b and the height of the pyramid is h. Pretend that I do not know the correct formula to this question (didn't Google it or didn't ask anyone), am I able to check my formula?