Attrition rate can be defined either by customer or by product. In either case, it is the number lost divided by the number at the start of the period and is typically expressed as a percentage (%) of all products/customers and on a monthly or annual basis. So for the customer attrition rate you would divide the number of customer lost by the total number of customers at the start of the period.
Attrition rate is also the compliment of Retention rate. If a company has a 20% attrition rate it will have an 80% retention rate.
It is an important variable to track in your business as it indicates how many new sales you have to make just to keep up with your losses.
Whether you track customer attrition rate or product attrition rate depends on your business goals at the time. Typically customer attrition rate is more difficult to measure but just as important at product attrition rate.
Sometimes it can be difficult to determine when a customer has left, especially in a retail environment but there are ways around this problem.