It may be the battery, or could be the charging circuit or adapter, as Prostar suggested. If you can find a compatible laptop, you can test the adapter that way. However, batteries do wear out, and 1-2 years tend to be the average lifespan of a battery, based on how it was used.
Casey