A fast three-dimensional discrete cosine transform algorithm (3D FCT) and a fast 3D inverse cosine transform (3D IFCT) algorithm are presented, suitable for analysis of 3D data points. Many existing algorithms for three-dimensional data points make use of either the 1D cosine transform or both the 2D and 1D cosine transforms. Existing algorithms based on the 1D discrete cosine transform (DCT) apply the separable 1D transform to the data points in the x, y, and z directions, respectively, while those based on 2D and 1D transforms apply the 2D cosine transform for the x-y planes and then the 1D cosine transform in the z direction. The proposed 3D DCT algorithms handle the 3D data points directly and have been shown to be computationally efficient. They involve a 3D decomposition process where a data volume is recursively decomposed in each dimension until unit data cubes are obtained. The algorithms are presented in the form of a signal flow graph which captures the various computations involved. A complexity analysis along with empirical results is included, demonstrating the performance of the proposed direct 3D DCT algorithms. As 3D FCT and IFCT are symmetric and relatively fast, they can be used in any application requiring a real-time symmetric codec, such as video conferencing, online multiparty video games, and three-dimensional graphics rendering.