A personal electronic device determines its orientation by performing a number of operations. The personal electronic device determines one or more sample periods and creates rolling averages of accelerations for a plurality of axes over the one or more sample periods. The personal electronic device then identifies current values for the rolling averages of accelerations along each of the plurality of axes, wherein the current values indicate a gravitational influence and assigns a dominant axis based upon the current values.