The sphere and the cylinder have equal heights.
A right triangle is created by the radius of the sphere r, the radius of the cross section y, and the distance between the center of the sphere and the center of the cross section x.
So
by the Pythagorean theorem.
The area of the cross section of the sphere, and every cross section parallel to it, is
.
Each cross section of the cylinder with two cones removed is the shape of an annulus with an area of
.
By Cavalieri's principle, this sphere and this cylinder with two cones removed have equal volumes.
The volume of the cylinder with radius r and height 2r is
.
The volume of each cone with radius r and height r is
.
The volume of the cylinder with two cones removed is
.
Therefore, the volume of the sphere is
.
In Mathematics and Euclidean Geometry, the volume of a sphere can be calculated by using the following mathematical equation (formula):
Volume of a sphere =

Where:
r represents the radius.
Cavalieri's principle states that two geometric figures would have the same volume when they have the same height and the same cross-sectional area (CSA) at every point along that height.