A general approach to the calculation of heteroepitaxial strain for arbitrary crystal symmetry (including triclinic) and arbitrary interface plane is presented. The formulas are easily implemented into an algebraic math program. Particular results are derived for rhombohedral heterostructures.