The higher the number, the greater the viscosity. Viscosity is explained as the state of being, which would be thickness, sticky, and semi-fluid inconsistency. 5W40 has a higher viscosity than 5W30. Also, 30 weight is used in temperature ranges from -25°C or -13°F and 25°C or 77°F, while the 40 weight ranges from -25°C or -13°F and 35°C or 95°F.
Both oils are five grade when cold, but 5W30 is a 30 grade, and 5W40 is a 40 grade at operating temperatures. 40 weight with higher temperature in the summer has a greater viscosity than 30 weight, which contributes to the uninterrupted functioning of the motor. 40 weight provides higher pressure, but less flow. 30 weight is lighter, so it provides improved fuel consumption, and 40 weight delivers a weak fuel economy.