The Yosemite Decimal System (YDS) is a five-part system used for rating the difficulty of walks, hikes, and climbs, primarily used by mountaineers in the United States and Canada. It was first devised by members of the Sierra Club in Southern California in the 1950s as a refinement of earlier systems, particularly those developed in Yosemite Valley, and quickly spread throughout North America.
The class 5 portion of the class scale is primarily a rock climbing classification system, while classes 1–2 are used mainly in hiking and trail running. Class 3 describes easy and moderate climbing (i.e. scrambling), with varying amounts of exposure (length of a possible fall). Class 4 is an "in-between" rating that describes a very exposed scramble, corresponding roughly to the IFAS classification of PD+. Climbers, specifically those involved with technical class 5 climbing, often abbreviate "class 3" and "class 4" to "3rd" and "4th" respectively.
Originally the system was a single-part classification system. "Grade" and "protection" categories were later added to the system. The new categories do not apply to every climb and usage varies widely. "Grade" describes the amount of time needed to complete a climb, and "protection" describes the availability and quality of places on a climbing route where a climber may utilize climbing protection; ratings for these can be subjective.
Class 5 is subdivided into parts, currently 5.0 to 5.15. Ratings 5.10 and above are further subdivided, for example, 5.10b or 5.15c. When writing out a full YDS rating, grade is added after classification, and is followed by protection, so a typical YDS route description would be something like "5.10b VI R". Often the grade is omitted, and just the classification and protection ratings used. If the amount of protection available on a route is not concerning, then the protection rating is omitted as well.
While the YDS is primarily considered a free climbing system, an aid-climbing designation is sometimes appended, numbered A0 to A5. For example, the North America Wall on El Capitan would be classed "5.8 VI A5" using this mixed system.
Guidebooks sometimes append some number of stars to the YDS rating, to indicate a climb's overall "quality" (how "fun" or "worthwhile" the climb is). This "star ranking" is unrelated to the YDS system, and varies from guidebook to guidebook.
The system now divides all hikes and climbs into five classes:  The exact definition of the classes is somewhat controversial, and updated versions of these classifications have been proposed.
Classification of climbs can vary quite a bit depending on location and history. Indoor gym ratings tend to be much higher ("softer," inflated) compared to outdoor ratings. Ratings tend to be lower ("old school" or "sandbagged") in outdoor areas where climbing routes were developed earlier. Guidebooks have often raised the ratings on older climbs to make them more comparable to newer ratings. For example, although The Trough at Tahquitz was originally the standard for 5.0, the 2001 edition of the standard guidebook rates it as 5.4.
The YDS grade system involves an optional Roman numeral grade that indicates the length and seriousness of the route. The grades are:
|I||One to two hours of climbing|
|II||Less than half a day|
|III||Half a day climb|
|IV||Full day climb|
|V||A climb lasting 2–3 days|
|VI||A climb lasting 4–6 days|
|VII||A climb lasting a week or longer|
The grade is more relevant to mountaineering and big wall climbing, and often not stated when talking about short rock climbs.
An optional protection rating indicates the spacing and quality of the protection available for a well-equipped and skilled leader. The letter codes chosen were, at the time, identical to the American system for rating the content of movies, except that there is no commonly recognized distinction between PG and PG13:
|G||Good, solid protection.|
|PG/PG13||Fair protection. Falls may be long but a competent leader can place enough protection to avoid serious risk of injury.|
|R||Run-out climbing. Some protection placements may be far enough apart so that it is not possible to protect against hitting the ground or a ledge.|
|X||Protection is unavailable or so sparse that any fall is likely to result in death or serious injury.|
The G and PG ratings are often left out as they are typical of normal, everyday climbing. R and X climbs are usually noted as a caution to the unwary leader. Application of protection ratings varies widely from area to area and from guidebook to guidebook.
Originally, hikers and climbers in the Sierra Nevada would describe routes relative to other routes. For example, Z was harder than X but easier than Y. This primitive system was difficult to learn for those who did not yet have experience of X or Y. In the 1930s, the Sierra Club therefore adapted a numerical system of classification that was easy to learn and which seemed practical in its application. This system, without the decimals, was initially referred to as the "Sierra Club grading system." Class 1 was a hike, and higher classes were more difficult and technical, going up to class 6, which referred to aid climbing.
The fifth class encompassed a wide variety of levels of difficulty in roped free climbing, however, and the system began to be refined by climbers at Tahquitz Peak in Southern Cali. Fifth-class climbs were initially described as easy, moderate, or hard. This was found to be too coarse-grained, so Royal Robbins, Don Wilson, and Chuck Wilts came up with a decimal subdivision of fifth class consisting of 5.0, 5.1, and so on up through 5.9. This system was implemented in the early 1950s, with new routes and ratings at Tahquitz being described in mimeographed newsletters of the Rock Climbing Section of the Angeles Chapter of the Sierra Club. The system was originally referred to by names such as "Southern California" or "Wilts-Sierra system," but eventually came to be referred to as the Yosemite Decimal System, even though it was devised and standardized at Tahquitz, not Yosemite. The first systematic presentation was in the 1956 edition of Wilts's guidebook for Tahquitz. Mark Powell is said to have exported the system to Yosemite around the same time.
The original standards for the fifth-class climbing grades were as follows:
|Grade||Route||First free ascent|
|5.2||Frightful variation of the trough||1944|
|5.5||Ski tracks||1947, 1957|
The original intention was that 5.9 would be the hardest possible free climb, with class 6 describing aid-climbing routes. Initially the scale was based on ten climbs at Tahquitz, and ranged from the "Trough" at 5.0, a relatively modest technical climb, to the "Open Book" at 5.9, considered at the time the most difficult unaided climb humanly possible. In later years, as gear and athletic standards in the sport became more advanced, many aid routes were "freed" (i.e., climbed without aid), and the class 6 label fell into disuse, so that 5.x could be a label for any technical rock climb, regardless of whether most people were doing it free or aided. By the 1960s and 70s, increased athletic standards and improved equipment meant that class 5.9 climbs from the 1950s became only of moderate difficulty for some, while new 5.9 climbs were much harder. Class 5.9 began to be subdivided as 5.9- and 5.9+. Eventually, climbers began adding classes of 5.10 and 5.11. In the early 1970s, it was determined that the 5.11 climb was much harder than 5.10, leaving many climbs of varying difficulty bunched up at 5.10. To solve this, the scale has been further subdivided for 5.10 and above climbs with suffixes from "a" to "d". As of August 2021[update], only one climb is considered to have a difficulty of 5.15d: Silence, first climbed by Adam Ondra on September 3, 2017. 
There are other systems used throughout the world. They are covered in the article about Grade (climbing).