Go to Setup > Customer/Vendor > Payment Terms and click "New" (or "Duplicate").
The value inputted in fields "Month" and "Day" will determine the length of this Payment Term.
If you select "Invoice Date" under Base, each document's Due Date will be automatically set based on the document's date once you select this payment term.