With only one or two points where the function is not essentially constant to within the noise of the system, a good fit will be highly problematic. However, if you do not provide starting values for a problem involving expeonentials, expect garbage in the fit.
What did you get? Oh, right! Garbage. What a surprise. So, first, LOOK AT YOUR DATA. THINK ABOUT WHAT YOU SEE.
x = [12.5 17.5 22.5 27.5 32.5 34.5 36.5 37 37.5 38 38.5 39 39.5 40 40.5 41];
y = [6924389.58 7199598.07 7021016.88 7274575.20 7136362.29 7007205.28 6325328.04 6921281.59 7118442.65 6632108.61 7115114.23 6934792.13 6894812.36 6346667.73 5328042.11 2999529.33];
What is your model? A sigmoidal form.
ft = fittype('a/(1+exp(b*(x-c)))','indep','x');
What is c here? The midpoint of the sigmoidal transition. It should be just a little over 40 from the plot. I will guess 41 or 42.
What is b? A rate parameter. 0.1 seems a decent guess. As long as I get the sign right, this is what is important. I need to be in the right ball park on the value itself, but I hope .1 is good. Too small is far better than too big a value for this rate constant however.
The sigmoidal model you have posed will have an upper asymptote, so where x--> -inf, as a. That would suggest a good starting value for x would be 7e6, purely from the plot.
The lower asymptote, where x--> inf, will be zero. I don't know if that is the behavior you would be looking for. Regardless, it would be literally impossible to estimate an asymptote as x--> inf here anyway. You have no data out there.
Not using starting values in the fit here will absolutely produce garbage for a result, since fit uses random staritng values otherwise.
mdl = fit(x',y',ft,'start',[7e6,.1,41])
mdl(x) = a/(1+exp(b*(x-c)))
a = 6.971e+06 (6.821e+06, 7.121e+06)
So I was dead on about the estimates of a and c. I was way off on b, and I should have been smarter there. Had I taken a few seconds more in looking at the plot, I would have chosen a value around 1 instead. Regardless...
How is the fit?
This seems as good as I could expect. If you choose not to provide starting values for exponential models, expect garbage for a result in general. That is especially true when so little information content is present in your data. That is definitely the case here, where only about 3 out of 16 data points offer any value to estimate the shape of your curve.