what is the equation in order for me to get the volume for a truncated cone

A truncated cone is known as a "frustum "

It looks like this :

The volume is given by : [ pi * h / 3 ] * [ R^2 + rR + r^2 ]

Where h is the height, r is the radius of the upper base and R is the radius of the lower base