Your first RMD must be taken by April 1 the year after you retire. The investment company that holds your 401K will normally calculate your RMD for you. Otherwise, the IRS offers worksheets: https://www.irs.gov/retirement-plans/plan-participant-employee/required-minimum-distribution-workshe...