Bug: Simply Bug is an error found BEFORE the application goes into production. A programming error that causes a program to work poorly, produce incorrect results, or crash. An error in software or hardware that causes a program to malfunction.
Defect is the difference between expected and actual result in the context of testing. Defect is the deviation of the customer requirement. An Error found in the product itself after it is shipped to the customer. Defect is an error found AFTER the application goes into production. Simply defect can be defined as a variance between expected and actual. Defect is an error found AFTER the application goes into production.