Cart abandonment rate is calculated by dividing the total number of completed purchases by the number of carts abandoned. Then, subtracting the result by 1 and multiplying by 100 to get a percentage. For example, if you have 5 completed purchases and 20 shopping carts, your abandonment rate is 75%.