All of the 300 series stainless (austenitic) steel is considered to be weakly magnetic in its annealed state. These include the common 303, 304, and 316 alloys. 18-8 stainless is another name for 304 stainless (18% chromium and 8% nickel). Surprisingly it is the nickel content in the stainless that makes the steel less magnetic. Nickel usually makes things more magnetic in other metals.

The 400 series are very magnetic (martensitic). They do not contain nickel.

17-4 stainless is a different class of stainless, and contains a little nickel (4%) but has other stuff in it that makes it magnetic.

To make it even more confusing: All stainless steels, including the 300 series, become very magnetic when hardened. A soft ductile 316 stainless cotter pin is not very magnetic, but a 316 stainless spring is highly magnetic. If it is stainless and "springy" it will most likely be very magnetic.