This paper presents a generic mathematical algorithm to determine the best part orientation for building a part in a layer-by-layer rapid prototyping (RP) system. The algorithm works on the principle of computing the volumetric error (VE) in a part at different orientations and then determining the best orientation based on the minimum VE in the part. The algorithm is shown to work for a part of any shape and complexity, with any slice thickness, and for the orientation of a part about any selected axis. The part orientation system based on this algorithm graphically displays the VE at different part orientations and recommends the best part orientation. The system will help RP users in creating RP parts with a higher level of accuracy and surface finish.