How to fix a divide or divide by zero error

Updated: 06/30/2020 by Computer Hope
Note

This page also applies to the error messages "Divide by Zero," "Divide by 0," or "Divide Overflow" error messages.

Calculator divide by zero error

The divide error messages happen when the computer or software attempts run a process that performs a mathematical division by zero, because it is an illegal operation. This error message could also be caused by a computer or software limitation or conflict with computer memory.

Improper calculation

If you or the program you're using performs a calculation in any program and experience a divide error, ensure that the calculation being performed is possible. Some programs are not capable of verifying the accuracy of a calculation and may perform an illegal instruction.

Programs such as Microsoft Excel, generate a #DIV!0 error to indicate the formula or calculation is invalid. For example, when attempting to divide by zero.

Hardware or software incompatibility

This issue can occur if a program is incompatible with hardware or software on your computer. Make sure all computer software installed is up-to-date and compatible with the operating system and hardware inside and connected to the computer.

Driver issue

If you are encountering a divide error while using Windows, make sure you are running the latest drivers and software for all component hardware devices. Verify the video card, sound card, network card, and modem drivers on the computer.

You can find a listing of computer drivers on our drivers page.

Software issue

If the divide error happens in a game or program, and the above recommendations don't resolve your issue, verify all software patches and upgrades are installed.

Also, verify no other program is running in the background that could be causing your problem by End Tasking all background programs and TSRs.

External cache or 2nd level cache

If you are encountering the divide error in an older program or game, it can be caused by compatibility issues with external cache or 2nd level cache. Temporarily disabling this feature in your BIOS setup may resolve your issue.

Operating system issue

If you continue to experience divide errors and tried all of the above recommendations, make sure it's not a problem with the operating system by reinstalling the operating system.

Hardware issue

Finally, if none of the above recommendations resolve or help to determine what's cause your issue, the computer may have a hardware issue. When a divide error is encountered because of hardware, it's usually caused by an issue with the computer processor (CPU).

Error with autoexec.bat or config.sys

Users who are running Microsoft Windows 3.x can temporarily remark or remove any additional lines that may not be required in the autoexec.bat and config.sys.

Users who are running Microsoft Windows 95 or Windows 98, we recommend they temporarily rename the autoexec.bat and config.sys to ensure that these files are not causing the issue. To do this, follow the instructions below:

  1. Click Start, Shutdown, and then Restart the computer in an MS-DOS mode.
  2. Once at the MS-DOS prompt, type:
cd\ <press Enter>
ren autoexec.bat autoexec.ch <press Enter>
ren config.sys config.ch <press Enter>
  1. Once the files are renamed, reboot the computer.

Additional help and information with the autoexec.bat and config.sys is on our autoexec.bat and config.sys page.

Note

If you can't get to an MS-DOS prompt or Windows to rename or edit the files, boot the computer to an MS-DOS mode only.