It all depends on who your employer is:
Non-Postal Service Employees – Unless you are a member of the Senior Executive Service, if you are employed within the U.S. or any of its territories and possessions, you may accumulate and carry-over a maximum of 240 hours of annual leave into the next leave year. Overseas employees may accumulate and carry over a maximum of 360 hours. If you are an SESer, you can carry over a maximum of 720 hours, unless you have a personal base that is higher.
However, you can receive a lump sum payment that is greater than those carry-over limits, if you retire before the start of the new leave year. For example, if you entered 2007 with a maximum number of hours and retire by January 3, 2008, you can receive a lump-sum payment for that amount plus any unused annual leave hours you have accumulated over the course of the year.
Postal Service Employees – If you are a member of the Postal Career Executive Service (PCES), you can receive a lump-sum payment for an unlimited amount of unused annual leave. If you are under the Executive and Administrative Schedule (EAS), which includes supervisors, managers, postmasters and other non-bargaining unit employees, you can receive a lump-sum payment for a maximum of 560 plus any earned and unused annual leave during the year in which you retire. In other words, if you entered that calendar year with 560 hours and took no leave during it, you could receive a payment for 768 hours. If you are a Clerk and Letter Carrier covered by union contracts with such organizations as APWU and NALC, you can receive a maximum lump-sum payment for 440 hours.
As for how the Lump-sum Payment is calculated:
When calculating a lump-sum payment, your agency will project those unused hours of annual leave forward as if you were still on the rolls. The amount will be figured on what you would have received had you remained on the agency’s rolls. Included in that amount will be such things as basic pay, locality pay and non-foreign area cost-of-living adjustments, and any pay raise (other than a step increase) to which you would have been entitled.