[[File:Cnc lathe.png|thumb|A CNC [[metal lathe]] with the door open.]]
In'''Computer numerical control''' ('''CNC''') is the [[machiningAutomation|automated control]], of [[machine tool]]s by a computer. It is an evolution of '''numerical control''' ('''NC'''), where machine tools are directly managed by [[data storage media]] such as [[punched card]]s or [[punched tape]]. Because CNC allows for easier programming, modification, and real-time adjustments, it has gradually replaced NC as computing costs declined. <ref>https://www.pcmag.com/encyclopedia/term/numerical-control</ref> also called '''computer numerical control''' ('''CNC'''),<ref>{{Cite web|title=What Is A CNC Machine? |url=https://cncmachines.com/what-is-a-cnc-machine|access-date=2022-02-04|website=CNC Machines }}</ref> is the [[automation|automated control]] of tools by means of a [[computer]].<ref>{{cite encyclopedia |last=Groover |first=Mikell P. |date=2024-10-28 |title=Automation - Numerical Control, Robotics, Manufacturing |url=https://www.britannica.com/technology/automation/Numerical-control#ref390752 |access-date=2025-03-18 |encyclopedia=[[Encyclopædia Britannica]]}}</ref> It is used to operate tools such as [[drill]]s, [[lathe]]s, [[Milling (machining)|mills]], [[Grinding machine|grinders]], [[CNC router|routers]] and [[3D printer]]s. CNC transforms a piece of material ([[metal]], [[plastic]], wood, ceramic, stone, or composite) into a specified shape by following coded programmed instructions and without a manual operator directly controlling the machining operation.
A CNC machine is a motorized maneuverable tool and often a motorized maneuverable platform, which are both controlled by a computer, according to specific input instructions. Instructions are delivered to a CNC machine in the form of a sequential program of machine control instructions such as [[G-code]] and M-code, and then executed. The program can be written by a person or, far more often, generated by graphical [[computer-aided design]] (CAD) or [[computer-aided manufacturing]] (CAM) software. In the case of 3D printers, the part to be printed is "sliced" before the instructions (or the program) are generated. 3D printers also use G-Code.<ref name=":1">{{Cite web |date=2022-06-24 |title=What is CNC Milling and How Does it Work: Everything You Need to Know |url=https://www.3erp.com/blog/cnc-milling-everything-you-need-to-know/ |access-date=2025-03-18 |website=3ERP}}</ref>