Any time you want. If you do that within the period the money back guarantee lasts, you get a full refund of your money. If you cancel your subscription in a regular way, the company stops charging you starting from the end of the current payment term.
Attention: if the company has a payable trial period and you don’t want to use the software after the expiration of said trial, cancel your subscription as soon as possible. Failure to do so results in the renewal of your subscription on a monthly basis and you will be continuously charged until you properly cancel your account!