Stainless steel is generally classified into three types: austenitic, ferritic, and martensitic, based on its microstructure. The magnetic properties of stainless steel depend on its microstructure and chemical composition.
Austenitic stainless steels, such as 304 and 316, are non-magnetic because they have a face-centered cubic (fcc) crystal structure that does not allow magnetic fields to pass through easily. These stainless steels contain high levels of chromium and nickel, which give them their corrosion-resistant properties and make them suitable for use in harsh environments.
On the other hand, ferritic and martensitic stainless steels are magnetic due to their body-centered cubic (bcc) crystal structure. Ferritic stainless steels, such as 430, contain higher levels of chromium than martensitic stainless steels, making them more corrosion-resistant. Martensitic stainless steels, such as 410, are magnetic and have lower corrosion resistance.
In summary, 304 and 316 stainless steels are non-magnetic because they are austenitic stainless steels with an fcc crystal structure. However, there may be some magnetic properties if the steel is cold-worked or if it has impurities.

