# Calculating The Volume of a Smooth Object Defined by a Function Using Calculus
If the object is defined by revolving $f(x)$ around the $x$ axis, the object’s volume can be calculated as follows ($a$ and $b$ represent the object’s length)
$
V = \int \limits_{x=a}^{x=b} \Bigg[\pi y^2 \Bigg]dx
$
If presented with a function where it is easier to define $x$ in terms of $y$, you can use the following formula instead (note that now the input is the object's height):
$V=\int \limits_{y=a}^{y=b} 2\pi xy \frac {dx}{dy}dy$