To build anisotropic, mechanically functioning tissue, it is essential to understand how cells orient in response to mechanical stimuli. Therefore, a computational model was developed which predicts cell orientation, based on the actin stress fiber distribution inside the cell. In the model, the stress fiber distribution evolves dynamically according to the following: (1) Stress fibers contain polymerized actin. The total amount of depolymerized plus polymerized actin is constant. (2) Stress fibers apply tension to their environment. This active tension is maximal when strain rate and absolute strain are zero and reduces with increasing shortening rate and absolute strain. (3) A high active fiber stress in a direction leads to a large amount of fibers in this direction. (4) The cell is attached to a substrate; all fiber stresses are homogenized into a total cell stress, which is in equilibrium with substrate stress. This model predicts that on a substrate of anisotropic stiffness, fibers align in the stiffest direction. Under cyclic strain when the cellular environment is so stiff that no compaction occurs (1 MPa), the model predicts strain avoidance, which is more pronounced with increasing strain frequency or amplitude. Under cyclic strain when the cellular environment is so soft that cells can compact it (10 kPa), the model predicts a preference for the cyclically strained compared to the compacting direction. These model predictions all agree with experimental evidence. For the first time, a computational model predicts cell orientation in response to this range of mechanical stimuli using a single set of parameters.