Following is a brief, general, and concise explanation about these engine oil grades (taken from multiple renowned sources) and a must read for getting some basic idea:
The viscosity of an oil is measured by its resistance to flow. There are two numbers that define the viscosity of an oil. The first number ends with the letter 'W', which stands for Winter. This measurement is related to how an oil flows when it is cold, such as at engine start-up. The second number is defined by how an oil flows at normal engine operating temperatures.
Viscosity means a fluid's resistance to flow. In motor oil, it's rated at zero degrees Fahrenheit (represented by the number preceding the "W" [for winter]) and at 212 degrees (represented by the second number in the viscosity designation).
"W" stands for Winter, and it shows that the oil meets the low-temperature requirements of the SAE, which is at 0 degrees Fahrenheit. The "5" is the oil's cold-weather viscosity rating, which shows how thick or thin the oil is when you try to start an engine at cold temperatures. The "30" shows the oil's viscosity rating at the SAE's high-temperature requirement, set at 212 degrees Fahrenheit.
The second number in the viscosity ratingāthe "40" in 10W-40, for exampleātells you that the oil will stay thicker at high temperatures than one with a lower second numberāthe "30" in 10W-30, for example.