Patent protection lasts 20 years from the date a patent application is filed. For patents that reference an earlier application, the term ends 20 years from the earliest referenced application. A number of adjustments to this term are set forth in 35 U.S. Code § 154 (b).
Subject to the payment of fees under this title, such grant shall be for a term beginning on the date on which the patent issues and ending 20 years from the date on which the application for the patent was filed in the United States or, if the application contains a specific reference to an earlier filed application or applications under section 120, 121, 365(c), or 386(c), from the date on which the earliest such application was filed.
— 35 U.S. Code § 154 (a)(2).
Prior to 1995 the term of a patent ran for 17 years from the time a patent was granted. The old rule created a mechanism through which patent owners could effectively delay the window of patent protection by prolonging the period between application and issuance of a patent. The law changed in 1995 after the Uruguay Round of the General Agreement on Tariffs and Trade/Trade Related Aspects of Intellectual Property (GATT/TRIPS) agreement provisions took effect.
See “USPTO Press Release: Patent and Trademark Office Handles Upsurge in GATT-Related Applications”, USPTO Website, June 28, 1995, Last accessed on 2/23/2017, (link).