The full details of Joseph Smith’s education are not completely known, but the best estimates are that he had the possibility to have up to seven years formal schooling. It is unlikely that Joseph had seven years as he stated that his family duties deprived him and his brothers the benefit of an education.
Irrespective of the number of years of schooling he had, we know that he was considered to be uneducated and ignorant by those favorable to him and by critics:
How do we reconcile the creation of the Book of Mormon with these descriptions of Joseph?
See: