You'll stop paying class 4 national insurance at the end of the tax year in which you reach the state pension age, currently age 66.