Here's a mass luminosity relationship that fits the empirical data closely.
Lower main sequence (M < 0.6224)
log L = 2.5186 log M - 0.4814
Middle main sequence (0.6224 < M < 1.6959)
log L = -1.142866 (log M)^2 + 4.621390 log M
Upper main sequence (M > 1.6959)
log L = 3.8931 log M + 0.1069
http://zebu.uoregon.edu/~imamura/208/feb6/ml.gif
(Fit to data is mine.)
The main sequence lifetime is found as
T = (10 billion years) M / L
where L = 10^(log L), and where for (log L) you substitute the function of log M from above. M is in units of the sun's mass. The sun's mass is 1.99E+30 kilograms. L is in units of the sun's luminosity. The sun's luminosity is 3.826E+26 watts.
Mass, Luminosity, Time on Main Sequence (10^9 years)
0.1, 0.00100, 1000.000
0.2, 0.00573, 349.024
0.3, 0.01591, 188.557
0.4, 0.03284, 121.818
0.5, 0.05760, 86.8049
0.6, 0.09117, 65.8112
0.7, 0.18060, 38.7600
0.8, 0.34786, 22.9975
0.9, 0.61114, 14.7265
1.0, 1.00000, 10.0000
1.1, 1.54644, 7.11310
1.2, 2.28435, 5.25314
1.3, 3.24892, 4.00133
1.4, 4.47621, 3.12765
1.5, 6.00272, 2.49887
1.6, 7.86503, 2.03432
1.7, 10.0939, 1.68418
1.8, 12.6096, 1.42748
1.9, 15.5638, 1.22078
2.0, 19.0038, 1.05242
Mass, Luminosity, Time on Main Sequence (10^6 years)
3.0, 92.1257, 325.64
4.0, 282.345, 141.67
5.0, 673.070, 74.286
6.0, 1368.74, 43.836
7.0, 2494.31, 28.064
8.0, 4194.88, 19.071
9.0, 6635.31, 13.564
10.0, 10000.0, 10.000
15.0, 48477.6, 3.0942
20.0, 148573, 1.3461
Mass, Luminosity, Time on Main Sequence (10^3 years)
25.0, 354177, 705.862
30.0, 720246, 416.524
35.0, 1.31e6,.266.659
40.0, 2.21e6, 181.209
45.0, 3.49e6, 128.881
50.0, 5.26e6, 95.0189