The test is one way to measure the level of student ability in participating in learning. One type of exam given to students is the type of essay exam. This research focuses on making automatic grading for essay-type tests using cosine similarity. This method has several stages such as tokenizing, filtering, stemming, analyzing, weighing words in documents with cosine similarity. The stemming process uses the Nazief & Adriani algorithm. The results of this study are concluded that the selection of words that are considered as keywords in the answer key greatly affects the results of the assessment of the system. This is evidenced by testing applying the cosine law of 89.5%. However, there are several types of questions that are significantly different because there are unique characters in the database and answer keys that do not contain keywords that match the correct answer.