A ratio compares two quantities. Sometimes both pieces matter (“2 parts vinegar to 5 parts oil” for a salad dressing), and sometimes the ratio is secretly a fraction of a whole (“I answered 17 out of 20 flashcards correctly”). Percentages are just ratios rewritten with a denominator of 100, which makes comparisons easier for humans and search engines alike.
When your ratio is “part out of whole,” divide the part by the whole and multiply by 100. When the wording is “A to B” without a stated total, build the whole first by adding parts before converting. Practise the arithmetic on the Basic calculator mode once you have reduced the ratio to a single fraction.