The accurate prediction of alloying effects on the martensitic transition temperature (Ms) is still a big challenge. To investigate the composition-dependent lattice deformation strain and the Ms upon the β to α″ phase transition, we calculate the total energies and transformation strains for two selected Ti−Nb−Al and Ti−Nb−Ta ternaries employing a first-principles method. The adopted approach accurately estimates the alloying effect on lattice strain and the Ms by comparing it with the available measurements. The largest elongation and the largest compression due to the lattice strain occur along ±[011]β and ±[100]β, respectively. As compared to the overestimation of the Ms from existing empirical relationships, an improved Ms estimation can be realized using our proposed empirical relation by associating the measured Ms with the energy difference between the β and α″ phases. There is a satisfactory agreement between the predicted and measured Ms, implying that the proposed empirical relation could accurately describe the coupling alloying effect on Ms. Both Al and Ta strongly decrease the Ms, which is in line with the available observations. A correlation between the Ms and elastic modulus, C44, is found, implying that elastic moduli may be regarded as a prefactor of composition-dependent Ms. This work sheds deep light on precisely and directly predicting the Ms of Ti-containing alloys from the first-principles method.