RETURN
Firstly, return is based upon the amount gained over a period of time. So your calculation for a percentage return should actually be be:
(Sale price - Cost basis)/Cost Basis.
TOTAL RETURN
A "total return" price series or index is a transformation of the original traded price timeseries to a timeseries that can be used to estimate/calculate a total return.
DIVIDENDS
For dividends, you become entitled to them at the close on the day prior to the ex-date. i.e. you must be holding on the close of the day prior to the ex-date. This dividend is then assumed to be re-invested at this time. However, this is not actually possible (on an absolute cash basis) since the dividend is typically paid to you some weeks later - the payment schedule is determined by the company.
Taking a dividend from Pfizer as an example:
A dividend of $0.32 was declared in Sep 2017, with ex-date 20171109, record date 20171110, payment date 20171201. This means you would need to be holding the stock at the close on 20171108 in order to receive the dividend and would receive the dividend about 3.5 weeks later.
WORKED EXAMPLE
Further to this, will this method of adjustment produce a correct return? Let's work your Pfizer example.
Looking at the actual raw underlying data:
PFE closed at 18.19 on 20091231. PFE closed at 36.22 on 20171229
There were no other capital altering events (stock dividends, splits, reverse splits, spinoffs, rights issues etc.) during this period, so the capital return is 36.22 - 18.19 = 18.03
Over the years the total dividends received was $8.00. (four each of 0.18,0.20,0.22,0.24,0.26,0.28,0.30,0.32)
There are no dividends that span the start and start and end period dates.
Therefore your % total return = (18.03 + 8.00)/18.19 = 143.1006%
If we use the reinvest-dividends-on-day-prior-to-exdate "Total Return" methodology, this gives:
(35.887527-13.3925581)/13.3925581 = 167.9122%
WHY THE DIFFERENCE?
Now you're seeing some rather big discrepancies between the return calculated by comparing two data points on the "Total Return" methodology and your actual total return. For long time periods of holding, with a reasonable dividend yield, the "Total Return" methodology has its limitations, as we have shown above.
CONCLUSION
For long periods of holding and/or with high dividend yield stocks, don't use the Total Return methodology. Calculate the capital return and total dividends received separately.
ALTERNATIVE METRICS COMMENTARY
Instead of a "8 year return" as we've calculated above, consider using annualized methodology such as Compound Annual Growth Rate. This will make it easier to compare returns where the holding period differs.