# Quarters

By now you’ve read, in one place or another, that Apple’s most recent results are slightly inflated because the quarter was 14 weeks long instead of 13. Jeff Johnson1 is being given primary credit for discovering this, although Philip Elmer-DeWitt wrote about it prospectively back in August, based on an investors’ note from Amit Daryanani.

I’m kind of pissed that I didn’t see this myself, not only because I’ve made a hobby of doing calendrical calculations, but because the scripts I use to make my plots include a calculation of the end date of each quarter. If only I’d thought to subtract successive end dates, I’d be the one pointing out that Apple’s results should be scaled by 13/14ths.2

What I can do, though, since the code is basically already written, is take a look backward and forward to see how common it is that an Apple fiscal quarter is something other than 13 weeks long. I published my plotting code back in July of 2015, and I explained the system for calculating Apple’s quarter ending dates this way:

But Apple doesn’t end its fiscal quarters where you might expect. If you look through the quarterly reports, you’ll see that they end on the last Saturdays of March, June, September, and December. So I wrote the short lastSaturday function to get that date for any given month. It’s a very short function because all the hard work is done by the relativedelta type, imported from the dateutil module. Was this really necessary? No, I could’ve just used the last day of the month and the plots wouldn’t have looked any different. But I thought it was worth getting some practice with relativedelta. And I like doing date calculations.

I don’t know if Apple has a public statement that its quarters end on the last Saturday of those three months, but that’s what I found in looking over some years’ worth of data. And PED mentioned it in his post, so I’m going to make my date calculations using that assumption.

Here’s the script:

python:
1:  #!/usr/bin/env python
2:
3:  from dateutil.relativedelta import *
4:  from datetime import date, timedelta
5:
6:  # Initialize
7:  macFile = 'mac-sales.txt'
8:  lastYear = 2000
9:  firstYear = 2007
10:
11:  # Get the last Saturday of the given month.
12:  def lastSaturday(y, m):
13:    return date(y, m, 1) + relativedelta(day=31, weekday=SA(-1))
14:
15:  # Get the end dates of every quarter in the input list.
16:  def getDates(qList):
17:    qmonths = {'Q1': 12, 'Q2': 3, 'Q3': 6, 'Q4': 9}
18:    dates = []
19:    for quarter in qList:
20:      year, q = quarter.split('-')
21:      year = int(year)
22:      month = qmonths[q]
23:      if month == 12:
24:        qend = lastSaturday(year-1, month)
25:      else:
26:        qend = lastSaturday(year, month)
27:      dates.append(qend)
28:    return dates
29:
30:  qList = [ '{}-{}'.format(y, q) for y in range(2000, 2025) for q in 'Q1 Q2 Q3 Q4'.split() ]
31:  dates = getDates(qList)
32:  for i, q in enumerate(qList[1:]):
33:    length = dates[i+1] - dates[i]
34:    if length.days != 91:
35:      qstart = dates[i] + timedelta(days=1)
36:      qend = dates[i+1]
37:      print "{}: {} thru {} = {} weeks".format(q,
38:                                               qstart.strftime('%Y-%m-%d'),
39:                                               qend.strftime('%Y-%m-%d'),
40:                                               length.days/7)


The key functions are lastSaturday, which is unchanged from my plotting script, and getDates, which is a simplified version of the getSeries function in the plotting script. It’s simpler because this script doesn’t have to read in sales figures and make the moving average calculations.

Line 30 is a overly cute list comprehension that creates qList, which looks like this:

['2000-Q1', '2000-Q2', … , '2024-Q3', '2024-Q4']


Line 31 then uses the getDates function to generate a new list with the end dates for all the quarters in qList. The loop in Lines 31–40 then calculates the lengths of the quarters and prints out those that aren’t 13 weeks long. The start of each quarter is taken as the day after the end of the previous quarter, which explains why the loop begins with qList[1] instead of qList[0]. The output of the script is

2000-Q4: 2000-06-25 thru 2000-09-30 = 14 weeks
2006-Q1: 2005-09-25 thru 2005-12-31 = 14 weeks
2006-Q2: 2006-01-01 thru 2006-03-25 = 12 weeks
2006-Q4: 2006-06-25 thru 2006-09-30 = 14 weeks
2012-Q1: 2011-09-25 thru 2011-12-31 = 14 weeks
2017-Q1: 2016-09-25 thru 2016-12-31 = 14 weeks
2017-Q2: 2017-01-01 thru 2017-03-25 = 12 weeks
2017-Q4: 2017-06-25 thru 2017-09-30 = 14 weeks
2023-Q1: 2022-09-25 thru 2022-12-31 = 14 weeks
2023-Q2: 2023-01-01 thru 2023-03-25 = 12 weeks
2023-Q4: 2023-06-25 thru 2023-09-30 = 14 weeks


This confirms that 2017-Q1 was indeed 14 weeks long. It also tells us that the quarter we’re in now should be a short one and the summer quarter should be another long one. But I don’t think that’s going to happen.

This year is laid out exactly like 2006, which you can confirm by using the cal command in the Terminal. In 2006, Apple stretched Q2 to end on April 1 instead of March 25, which gave Q2 the usual 13 weeks. That pushed the end of Q3 to July 1 to give both it and Q4 (which ended on September 30, as expected) 13 weeks.3

Assuming Apple follows its 2006 precedent, we won’t have to think about odd-sized quarters again until 2023. Mark your calendar.

By my calculations, the last time Apple had a long quarter was 2012-Q1, which differs from what Jeff Johnson said:

Most Apple fiscal quarters are 13 weeks long. Once in a while, however, they need a 14 week quarter. You might call it a “leap quarter”. There was a good explanation of this financial practice a few years ago in Slate. Apple’s Q1 2017 was a 14 week quarter, for the first time since Q1 2013.

That’s a year later than what my script says. To check my work, I pulled up Apple’s press release for the 2013-Q1 results. It says

CUPERTINO, California—January 23, 2013—Apple® today announced financial results for its 13-week fiscal 2013 first quarter ended December 29, 2012.

The press release for 2012-Q1 says

CUPERTINO, California—January 24, 2012—Apple® today announced financial results for its fiscal 2012 first quarter which spanned 14 weeks and ended December 31, 2011.

That makes me feel better about my results. I have a sense that Apple’s weird fiscal year lead Johnson astray.

After seeing how straightforward Apple was five years about reporting a long quarter, I went back to the press release for 2006-Q1

CUPERTINO, California—January 18, 2006—Apple® today announced financial results for its fiscal 2006 first quarter ended December 31, 2005, reporting the highest revenue and earnings in the Company’s history. Apple posted revenue of $5.75 billion and a net quarterly profit of$565 million, or \$.65 per diluted share, in this 14-week quarter.

Also an explicit statement that it was a long quarter.

So what about the press release from last Tuesday?

CUPERTINO, California — January 31, 2017 — Apple® today announced financial results for its fiscal 2017 first quarter ended December 31, 2016.

Oh, Apple, why so sneaky?

1. I don’t know, but I’m guessing Johnson’s website looks like something from the 90s because he simplified it after being Fireballed.

2. Or maybe I wouldn’t. This 13/14ths scaling applies to year-over-year calculations, which I typically don’t do. The four-quarter moving average plots are affected by less than 2% when there’s a long quarter.

3. This means my scripts are occasionally a week off. I may fiddle with them to handle these exceptions, or I may say to hell with it.