There is a typical lifespan of a battery, but there are many variables that can mean premature reduction in capacity. Older lithium-rechargeable batteries tend to lose capacity anyways. Batteries that are rarely recharged or that have suffered minor deep discharge might lose capacity. Sometimes there are manufacturing defects. A battery that was overheated can lose capacity. I'd at least run coconutBattery to get an idea.
https://www.coconut-flavour.com/coconutbattery/
Apple will perform the replacement for a generally reasonable price, with an OEM quality battery. In the United States it's $129 plus any sales tax, and they will only sell the battery as part of a complete service. However, they generally won't do the replacement unless the Condition is something other than "Normal" (more than 80% of new capacity).
Other than that, the battery replacement isn't that difficult to do yourself, but still carries risks. I believe it's easy enough, but due care needs to be taken to avoid damaging parts during disassembly. It also requires specialty tools - P5 (pentalobe) and T5 (Torx) screwdrivers. Some aftermarket battery kits come with basic versions of these screwdrivers.
MacBook Air 13" Mid 2011 Battery Replacement - iFixit
Where are you located? That might give us a better idea for an aftermarket battery purchase if that's what you want.