Requirements for completion
Graduate students often declare their intended degree (master's or doctorate) in their applications. In some cases, master's programs allow successful students to continue toward the doctorate degree.
Additionally, students who complete their coursework but not dissertation ("ABD," for "all but dissertation") often receive master's degrees and an additional master's called a Master of Philosophy, or MPhil, or C.Phil. "Candidate in Philosophy" degree.
The master's component of a doctorate program often requires one or two years, and some students, because doctoral programs are better-funded, apply for doctoral programs while only intending to attain a master's degree. This is generally not accepted and, if a student's advisor learns of the student's plans, can result in early termination.
Many graduate programs require students to pass one or several examinations in order to demonstrate their competence as scholars. Comprehensive examinations are often required in the first year of doctoral study, and are designed to test a student's background undergraduate-level knowledge. Students failing after two attempts are usually expelled from the program, often being awarded a master's degree instead of a Ph.D.
Some students who fail to perform well are declared "terminal master's" students and not allowed to progress on to the Ph.D. after finishing & defending their master's thesis. Comprehensive examinations of this type are more common in the sciences and some social sciences, and relatively unknown in most humanities disciplines.

