From the Document: "The armed forces are hierarchical organizations with clearly defined levels of authority. These different levels are called 'grades', while 'rank' refers to the order of precedence among those in different grades and within the same grade (e.g., someone who has been a Sergeant for three years outranks someone who has been a Sergeant for two years). However, it is common for the term rank to be used as a synonym for grade. Pay grade is an administrative classification that determines certain rates of pay, but it is sometimes used to indicate grade as well. For example, a Staff Sergeant in the Army may also be referred to as an E-6."
CRS In Focus, IF10684
Congressional Research Service: https://crsreports.congress.gov/