In object detection, the Intersection over Union (IoU) is the most popular criterion used to validate the performance of an object detector on the testing object dataset, or to compare the performances of various object detectors on a common object dataset. The calculation of this criterion requires the determination of the overlapping area between two bounding boxes. If these latter are axis-aligned (or horizontal), then the exact calculation of their overlapping area is simple. But if these bounding boxes are rotated (or oriented), then the exact calculation of their overlapping area is laborious. Many rotated objects detectors have been developed using heuristics to approximate IoU between two rotated bounding boxes. We have shown, through counterexamples, that these heuristics are not efficient in the sense that they can lead to false positive or false negative detection, which can bias the performance of comparative studies between object detectors. In this paper, we develop a method to calculate exact value of IoU between two rotated bounding boxes. Moreover, we present an (epsilon, alpha)-estimator (Iou) over cap of IoU that satisfies Pr(vertical bar(Iou) over cap - IoU vertical bar <= IoU epsilon) >= 1 - alpha. We also generalize the exact computing method and the (epsilon, alpha)-estimator of IoU, to three-dimensional bounding boxes. Finally, we carry out many numerical experiments in R-2 and R-3, in order to test the exact method of calculating the IoU, and to compare the efficiency of the (epsilon, alpha)-estimator with respect to heuristic estimates of IoU. Numerical study shows that the (epsilon, alpha)-estimator is distinguished by both precision and simplicity of implementation, while the exact calculation method is distinguished by both precision and speed.