
Let us choose an elementary mass dM at position x on x-axis. Its distance is also x from axis. Its moment of inertia dIz about Z-axis is given by

The total MI will be obtained by inetragion over the whole rod (from x= –L/2 to x= L/2). Thus

This is the MI of rod about CM-axis, normal to rod.