You can apply for Medicare when you turn 65 years old. The Initial Enrollment Period (IEP) lasts for 7 months, starting 3 months before you turn 65, and ending 3 months after the month you turn 65. During this period, you can sign up for both Part A (Hospital Insurance) and Part B (Medical Insurance) when you’re first eligible. If you or your spouse worked for at least 10 years, at jobs where you paid Medicare taxes, you can sign up when you’re first eligible. If you don’t sign up for Medicare when you’re first eligible, you’ll have to wait until the General Enrollment Period (January 1-March 31 each year) to sign up, and you may have to pay a late enrollment penalty.