The DAYS360 function in Google Sheets is a specialized tool designed to compute the difference between two dates using a 360-day year basis. This calculation method is frequently employed in various financial scenarios, particularly for simpler interest calculations where this standardized year helps streamline computations.
Syntax
DAYS360(start_date, end_date, [method])
- start_date: The starting date for the calculation.
- end_date: The ending date for the calculation.
- method: (optional) A logical value that determines which day-count method to use. If set to TRUE, it uses the US (NASD) method; if FALSE or omitted, it uses the European method.
Example #1
DAYS360("2023-01-01", "2023-12-31")
This function calculates the number of days between January 1, 2023, and December 31, 2023, using a 360-day year. The result would be 360 days.
Example #2
DAYS360("2023-01-15", "2023-02-15", TRUE)
Here, the function evaluates the difference between January 15, 2023, and February 15, 2023, following the US (NASD) method. The result in this case would be 30 days.
Example #3
DAYS360("2022-12-31", "2023-01-01", FALSE)
In this example, the function determines the number of days between December 31, 2022, and January 1, 2023, using the European method. The output would be 0 days, reflecting how this method counts days differently than the standard calendar count.
Error handling
- VALUE!: This error occurs when one or both date inputs are not recognized as valid dates.
- NUM!: This error appears when the start_date is later than the end_date, leading to an invalid calculation.
- NAME?: This indicates that the function name is misspelled or not recognized by Google Sheets.