In shoulder arthroplasty, the proximal humeral head is resected by sawing along the cartilage-bone transition and replaced by a prosthetic implant. The resection plane, called articular margin plane (AMP), defines the orientation, position and size of the prosthetic humeral head in relation to the humeral shaft. Therefore, the correct definition of the AMP is crucial for the computer-assisted preoperative planning of shoulder arthroplasty. We present a fully automated method for estimating the AMP relying only on computed tomography (CT) images of the upper arm. It consists of two consecutive steps, each of which uses random regression forests (RFs) to establish a direct mapping from the CT image to the AMP parameters. In the first step, image intensities serve as features to compute a coarse estimate of the AMP. The second step builds upon this estimate, calculating a refined AMP using novel feature types that combine a bone enhancing sheetness measure with ray features. The proposed method was evaluated on a dataset consisting of 72 CT images of upper arm cadavers. A mean localization error of 2.40mm and a mean angular error of 6.51° was measured compared to manually annotated ground truth.