If you only worked for one agency, you can look at your final Leave and Earnings Statement, LES, and it will have a box titled “Cumulative Retirement Contributions This Agency.” That will be the amount you have paid into the Civil Service Retirement & Disability Fund, CSRDF, via payroll deductions and is eligible to be refunded. If you have worked for more than one agency, your final LES from all previous agencies will show you the amount from that agency. Combine those numbers to determine your total contributions that are eligible to be refunded.
If you had temporary service prior to 1989 for which a deposit was made, that information will not be shown on the LES as the deposit was made to the Office of Personnel Management. OR if you made a military service deposit, that amount may or may not be on your LES in a different area. Those monies are also available to be refunded. The FERS lump-sum credit earns interest at the market rate and interest on refunded FERS contributions is compounded annually through the last day of the month preceding the date OPM makes payment. The interest rate is determined annually by the U.S. Department of the Treasury based on the average yield of new investments purchased by the Fund during the previous fiscal year.
The form you need to complete for your refund is Application for Refund of Retirement Deductions, https://www.opm.gov/forms/pdf_fill/sf3106.pdf
Having said all that, please consider if you leave your monies in the CSRDF, at age 62 you will be eligible to collect FERS Deferred pension as you are vested in FERS because you have more than 5 years of creditable FERS civilian service. This pension will be paid to you for your lifetime. It will be based on your high-3 average salary as of the date you resigned your federal position and will be multiplied by 7% (1% for every year and 1/12 of 1% for every full month). The amount you are eligible to receive in this pension my far exceed the refunded amount as the refunded amount is only what you paid info FERS, not what your agency contributed towards your retirement. Another consideration is, should you return to federal service before applying for a deferred retirement, you will build upon your retirement service history without have to redeposit those previously refunded monies plus applicable interest.
I realize I did not exactly answer your question, but the only place that has that answer is the Office of Personnel Management and responding to that request, just to know the answer, would not be considered a priority by OPM when they have a current backlog of 18,730 pending retirements. Additional information can be found at https://www.opm.gov/retirement-services/fers-information/former-employees/#Interest