Once issued, however, a United States patent will provide protection for the idea as stated in the claims, which may go beyond the actual software program. To obtain a patent for your software invention, you must meet the tests of utility, novelty and non obviousness. Claims which merely recite a mathematical algorithm are not patentable. The claims must recite elements of an apparatus or steps of a process. A patent will give you a period of 20 years of protection from the filing date of the application.
Copyrights also provide a level of protection for software.
A software program is copyrightable if it is an original work of authorship fixed in a tangible media. Copyright law does not protect processes, only how the steps in the process are expressed. As a result, copyright protection is more limited than patent protection. Federal copyright registration may, however, give you invaluable protection. Willful infringers are subject to large penalties.