The U.S. Navy is still using Windows XP -- now 14 years old and defunct -- and it has to pay Microsoft $9 million to keep supporting it.

Microsoft (MSFT) pulled support for Windows XP last year, and will no longer issue security updates to fix major holes in the software. Companies and agencies that are still running XP have the option of paying Microsoft for continued Windows XP updates, which provide an essential line of defense against hackers.

In a statement, the Navy said it has a plan in place to upgrade its systems to a newer version of Windows. It expects to complete its upgrades by July 12, 2016.

But there's a chance that it could take even longer. That's why the Navy's contract with Microsoft contains options to extend the deal through June 8, 2017. That would raise the amount the Navy will pay for Windows XP support to nearly $31 million.

"The Navy relies on a number of legacy applications and programs that are reliant on legacy Windows products," said Steven Davis, spokesman for Space and Naval Warfare Systems Command. "Until those applications and programs are modernized or phased out, this continuity of services is required to maintain operational effectiveness."

Though Microsoft's support for Windows XP ended in April 2014, the Navy didn't issue its decision to upgrade its computers until Vice Admiral Ted Branch, deputy chief information officer for the Navy issued an agency-wide memo on July 2014. In the memo, Branch required all of its PCs to be upgraded to Windows XP by April 30, 2015 -- or apply for a waiver for computers and systems that couldn't be updated by then.

Davis said that all of the computers ashore have since been upgraded to a newer version of Windows. But the significant number of systems afloat, including ships, submarines and other vessels, have not yet been upgraded.

The Navy didn't have exact figures on the number of systems that still run on XP, but given the $9-million-a-year check it's writing Microsoft, it's not a small amount of computers.

The XP issue is not restricted to the Navy. A stunning 44% of corporations still have Windows XP installed on at least one PC. Worldwide, nearly 15% of PCs are still running XP, according to NetMarketShare. And most bank ATMs are still running Windows XP as well.