# Get nth day of year

This formula takes advantage of the fact that dates are just sequential numbers in Excel. It determines the last day of the previous year and subtracts that value from the original date with this formula:

The result is nth day of the year, based on the date in cell B5. Notice the *day* argument in the DATE function is supplied as zero. A nice feature of DATE is it can handle *day* values that are "out of range" and adjust the result appropriately. When we give DATE a year for *year*, a 1 for month, and a zero for *day*, the DATE function returns the last day of the *previous* year:

So, the formula is solved like this

### nth day this year

To adjust the formula to return the nth day of year for the current date, just use the TODAY function for the date:

The logic of the formula remains the same, but the date values are supplied by the TODAY function.

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

## Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.