Is cast iron magnetic? Yes—most cast iron is magnetic and attracts a magnet. Common types, including gray and ductile cast iron, generally show this behavior. However, certain austenitic cast irons can be essentially nonmagnetic, so you cannot assume every grade responds the same way.
If you are choosing cast iron for a machined component, checking an existing part, or considering magnetic workholding, these differences matter. A magnet can give you a quick indication of magnetic behavior, but it cannot reliably identify the grade or confirm suitability for your application.
In this guide, you will learn what affects cast iron’s magnetism, how common types differ, and what these properties mean for practical uses and CNC machining.
What Is Cast Iron?

Cast iron is a family of iron–carbon alloys, typically containing about 2–4% carbon and 1–3% silicon by weight. If you are selecting it for a component, the type matters: its properties depend on both its chemical composition and its internal structure.
Depending on the grade and processing conditions, carbon appears mainly as graphite flakes, graphite nodules, or iron carbides. The surrounding metallic matrix can contain ferrite, pearlite, or austenite. These structural differences affect strength, brittleness, machinability, and magnetic behavior—which is why different cast irons do not all respond to a magnet in the same way.
Types of Cast Iron and Their Magnetic Properties
Most common cast irons are magnetic at room temperature, but their response depends on the grade and metallic matrix. Gray, ductile, white, and malleable cast irons generally attract a magnet. Austenitic cast irons are an important exception: certain grades are essentially nonmagnetic.
| Cast iron type | Representative grades or specifications | Typical microstructure | Magnetic behavior at room temperature |
| Gray cast iron | ASTM A48 Class 30 and Class 40 | Graphite flakes in a ferritic, pearlitic, or mixed matrix | Generally magnetic; the matrix and graphite distribution affect its magnetic properties. |
| Ductile cast iron | ASTM A536 65-45-12 and 80-55-06 | Graphite nodules in a mainly ferritic or mixed ferritic–pearlitic matrix | Generally magnetic. Ferritic grades typically magnetize more readily than predominantly pearlitic grades. |
| White cast iron | Unalloyed white iron; high-chromium grades covered by ASTM A532 | Iron or alloy carbides in a matrix that varies with composition and heat treatment | Often magnetic, but alloyed grades can respond differently, particularly when substantial austenite is present. |
| Malleable cast iron | ASTM A47 Grade 32510; pearlitic grades covered by ASTM A220 | Temper-carbon particles in a ferritic or pearlitic matrix | Generally magnetic; its response varies with matrix structure and heat treatment. |
| Austenitic cast iron | Ni-Resist Type 1; grades covered by ASTM A436 and ASTM A439 | Flake or nodular graphite in a nickel-stabilized austenitic matrix | Certain grades are essentially nonmagnetic; confirm the specified grade’s magnetic properties. |
Representative grades identify common examples; a specification alone does not establish an exact magnetic response.
If your application requires low magnetic permeability, request grade-specific data and define an acceptance limit rather than relying on the cast iron family name.
Why Is Cast Iron Magnetic?
Most cast iron is magnetic because its iron-rich matrix contains ferromagnetic phases. In ferrite, groups of atomic magnetic moments align within regions called magnetic domains. When you bring a magnet close, these domains can reorient or grow in the field’s direction, producing magnetic attraction.
The matrix structure matters. Ferrite is ferromagnetic at room temperature, and pearlite contains ferrite alongside cementite. These structures help explain why common gray and ductile cast irons attract a magnet. By contrast, a stable austenitic matrix can make certain alloyed cast irons essentially nonmagnetic.
Graphite does not create this attraction. It is diamagnetic, meaning it responds weakly against an applied magnetic field. Its flakes or nodules interrupt the magnetic matrix and influence how the material magnetizes, but their shape alone cannot tell you whether a casting is magnetic. You need to consider the surrounding matrix, alloy composition, and material condition together.
How Can You Test Whether Cast Iron Is Magnetic?

Does a magnet stick to cast iron? For most common grades, yes. You can use a handheld magnet to check whether your part shows noticeable attraction. For a useful comparison, keep the magnet and testing conditions consistent.
- Choose a suitable magnet. First, check that it attracts a known piece of carbon steel.
- Prepare the test area. Remove loose dirt, oil, rust, and metal particles. If possible, use an exposed metal surface without damaging a protective coating.
- Bring the magnet close slowly. Check for attraction, then let it contact the surface. Test several locations, especially on assemblies containing different materials.
- Consider the contact conditions. Curved surfaces, rough casting texture, thick coatings, and gaps can reduce the apparent pull. Part thickness and magnet strength also affect the result.
Paint or a coating can keep the magnet away from the underlying metal, making attraction harder to detect. Steel inserts, fasteners, or attached components can also produce a local response that does not represent the casting itself.
A magnet test cannot confirm the cast iron type, grade, strength, or machining suitability. It also cannot reliably distinguish cast iron from carbon steel, since both commonly attract magnets. If you detect no attraction, check the setup before assuming the material is nonmagnetic. For material identification, review the material certificate; for a specified magnetic requirement, use an appropriate measurement method and acceptance limit.
Cast Iron vs. Other Metals: A Magnetic Comparison
Cast iron, pure iron, and carbon steel generally attract magnets, while stainless steel’s response depends on its structure and condition. When you compare materials, check the specific grade and heat treatment rather than relying on the metal’s name alone.
| Material | Representative grades or conditions | Typical magnetic behavior at room temperature | What you should consider |
| Cast iron | Gray and ductile iron with ferritic or pearlitic matrices | Generally magnetic | Austenitic cast iron grades can be essentially nonmagnetic. Graphite and matrix structure affect the response. |
| Pure iron | High-purity iron in an annealed condition | Ferromagnetic; readily magnetized | Purity, residual stress, and annealing affect permeability and how easily it loses magnetization. |
| Carbon steel | AISI 1018 or 1045 in common room-temperature conditions | Generally magnetic | Carbon content, heat treatment, and microstructure affect magnetic properties and retained magnetism. |
| Ferritic stainless steel | Type 430 | Magnetic | Its ferritic matrix produces attraction despite its chromium content. |
| Martensitic stainless steel | Types 410 and 420 in hardened conditions | Magnetic | Heat treatment changes the structure and magnetic response; hardness does not directly indicate magnetic pull. |
| Austenitic stainless steel | Types 304 and 316 in a solution-annealed condition | Generally essentially nonmagnetic | Cold working can produce magnetic martensite, particularly in less stable austenitic grades. |
| Duplex stainless steel | Duplex 2205 | Magnetic | Its ferrite phase produces attraction even though the structure also contains austenite. |
These are qualitative descriptions, not a ranking of magnetic strength. Actual results depend on the material condition, part geometry, and test setup.
What Factors Affect Cast Iron’s Magnetism?
Cast iron’s magnetic behavior depends mainly on its metallic matrix, alloy composition, and temperature. Heat treatment can change that behavior by altering the internal structure. However, a weaker pull during a magnet test does not always mean the material itself has become less magnetic.
| Factor | How it affects magnetic behavior | What it means for your part |
| Matrix structure | Ferrite is ferromagnetic at room temperature. A pearlitic matrix also contains magnetic phases, while a stable austenitic matrix can be essentially nonmagnetic. | Two cast irons can respond differently even when both contain graphite. Check the matrix and grade. |
| Alloying elements | Elements such as nickel, manganese, and chromium can change the balance of ferrite, austenite, and carbides. Their effect depends on composition and processing. | Do not assume that adding a particular element always increases or decreases magnetism. |
| Graphite content and distribution | Graphite interrupts the magnetic matrix. Its amount, shape, and distribution influence permeability and the way the material magnetizes. | Flakes or nodules alone cannot establish a casting’s magnetic performance. |
| Temperature | Ferromagnetic phases lose their ferromagnetism above their Curie temperatures. The transition depends on the phases and alloy composition. | Room-temperature magnet tests do not establish magnetic behavior at operating temperature. |
| Heat treatment | Annealing, hardening, and other treatments can alter the matrix, carbide distribution, and residual stress. | The same nominal grade may have different magnetic properties after different treatments. |
Separate these material effects from the conditions of your magnet test. Paint, rust, surface roughness, and curvature can create gaps that reduce attraction. Magnet strength, part thickness, and contact area also affect the pull you feel. These conditions change the observed result without necessarily changing the cast iron’s underlying magnetic properties.
For a meaningful comparison, use the same magnet on similarly prepared surfaces and comparable part geometries. If magnetic performance is a design requirement, specify a measurable property and test conditions rather than relying on attraction alone.
What Does Cast Iron’s Magnetism Mean for CNC Machining?

Cast iron’s magnetism mainly affects how you hold and clean a part during machining. When planning CNC machining, consider these requirements alongside geometry and tolerances. It does not, by itself, determine machinability: hardness, carbides, and the matrix structure have a more direct influence on cutting performance.
Choosing a Workholding Method
For suitable cast iron parts, a magnetic chuck can leave more surfaces accessible to the cutting tool and reduce interference from clamps. However, attraction alone does not guarantee secure workholding. The grade, contact area, part thickness, surface condition, and cutting forces all matter. Rough cast surfaces or thin sections may require a different fixture or additional support.
Managing Residual Magnetism and Chips
If your part retains magnetism after magnetic workholding or inspection, it can attract ferrous chips and fine particles. These particles can collect in holes, threads, and mating surfaces, making cleaning more difficult. Debris trapped beneath a part or against a measuring surface can also interfere with seating and inspection.
Where residual magnetism matters to the final assembly, include an acceptance limit and measurement method in your drawing or inspection requirements. Demagnetization may be needed before final cleaning and inspection. Discuss any special magnetic measurements as part of your quality assurance requirements before ordering.
When you discuss your cast iron component with YD Rapid, provide the material grade, drawing, quantity, and critical surfaces. Flag any residual-magnetism or cleanliness requirements early so they can be considered when planning workholding, cleaning, and inspection.
FAQs
How Can You Tell Cast Iron from Steel?
Start with the material certificate, drawing specification, or casting identification marks. Appearance and a magnet test alone are inconclusive. If documentation is unavailable, a qualified laboratory can use chemical analysis and metallographic examination to distinguish graphite-containing cast irons from steel. Specify the required confidence before choosing an identification method.
Are Cast Iron Pipes Magnetic?
Most conventional gray cast iron pipes and ductile iron pipes attract a magnet at room temperature. However, coatings, corrosion, and access to the pipe wall can affect the test. Attraction alone cannot distinguish cast iron pipe from steel pipe or establish the pipe’s condition, pressure rating, or suitability for reuse.
Is Cast Steel Magnetic, and How Is It Different from Cast Iron?
Most carbon and low-alloy cast steels are magnetic at room temperature, while certain austenitic cast steels can be essentially nonmagnetic. “Cast” describes how the component is formed; it does not establish its magnetic properties. Cast steel generally has a lower carbon content than cast iron, so both materials can attract a magnet despite their different compositions and structures.
Conclusion
Most cast iron is magnetic, but the type and matrix structure matter. Common gray, ductile, white, and malleable cast irons generally attract a magnet, while certain austenitic grades can be essentially nonmagnetic. A magnet test offers a quick check of attraction, but it cannot confirm the material grade or suitability for your part.
For your next cast iron CNC machining project, request a machining quote from YD Rapid with your drawing, material grade, and required quantity. Include any magnetic or cleanliness requirements so these can be considered during the project review.

