A quarterly revenue comparison can look like a growth story simply because one quarter contains an extra week. Comparing dates exactly one year apart can also miss the matching period when a company's fiscal calendar ends on a particular weekday.
Take two fictional quarters: one runs for 91 days and reports $910 million in revenue; the comparable quarter runs for 98 days and reports $980 million. Total revenue grew by 7.7%, while revenue per calendar day stayed at $10 million. That daily rate is a rough diagnostic, not a substitute for the company's own comparable sales or an adjustment for seasonality.
Match the fiscal period before calculating growth
Start with the issuer's fiscal year and fiscal quarter, then inspect the actual start and end dates. A 52/53-week fiscal year can shift a period end by several days from the prior year. A strict current_end - 365 days join can miss the correct observation, while choosing the nearest end date without checking duration can pair a quarter with a year-to-date fact.
The SEC's EDGAR API documentation describes company facts and the calendar-aligned frames endpoint. Frames approximate calendar periods across issuers; retain the underlying start and end dates when comparing a particular issuer's fiscal periods. Confirm the issuer's fiscal calendar and any extra-week disclosure in its filing.
The small example below starts after candidate selection. The two rows are hypothetical, already identified as comparable standalone quarters, and expressed in the same currency and unit. It calculates inclusive duration and reports both total growth and a duration-normalized diagnostic.
from datetime import date
from decimal import Decimal
def days_inclusive(start, end):
if end < start:
raise ValueError("end precedes start")
return (end - start).days + 1
def compare_quarters(prior, current):
if prior["unit"] != current["unit"]:
raise ValueError("units differ")
p_days = days_inclusive(prior["start"], prior["end"])
c_days = days_inclusive(current["start"], current["end"])
if prior["value"] == 0:
raise ValueError("prior value is zero")
growth = current["value"] / prior["value"] - 1
daily_growth = ((current["value"] / c_days) /
(prior["value"] / p_days) - 1)
return p_days, c_days, growth, daily_growth
prior = {"start": date(2023, 10, 1), "end": date(2023, 12, 30),
"value": Decimal("910"), "unit": "USD millions"}
current = {"start": date(2024, 9, 29), "end": date(2025, 1, 4),
"value": Decimal("980"), "unit": "USD millions"}
p_days, c_days, total, daily = compare_quarters(prior, current)
assert (p_days, c_days) == (91, 98)
assert round(total * 100, 1) == Decimal("7.7")
assert daily == 0
The dates model a possible quarter boundary, not a real issuer's results. Fiscal period labels need an issuer-specific calendar; CY2024Q4 and a company's fiscal Q4 do not necessarily describe identical dates. Keep the filing accession alongside every selected value so that an analyst can inspect the source and its comparative column.
Check the inputs before using the result
First establish that both values are standalone duration facts for the same metric and accounting basis. A nine-month cash-flow figure cannot be compared directly with a three-month figure. A duration check will catch many such mistakes, although it cannot prove that the underlying concepts are equivalent. If a quarter must be derived from cumulative figures, preserve both source accessions and flag the result as derived. Reclassifications can affect the subtraction, as discussed in our quarter versus year-to-date guide.
Next, compare units and scope. Currency conversion needs an explicit exchange-rate policy; a segment figure should not silently replace a consolidated one. If multiple filings report the same period, choose the filing vintage appropriate to the analysis and retain it. A point-in-time backtest must exclude observations that were not yet available at the simulated decision time.
Finally, treat the daily calculation as a diagnostic. An extra week during a holiday shopping period can have a different sales profile from an average week. The company may disclose an extra-week contribution or a comparable-period adjustment; use that explanation when available, and keep it separate from the simple per-day calculation. For margins or per-share figures, dividing the reported ratio by days has no useful interpretation. Compare the underlying numerator and denominator over the appropriate periods instead.
A practical output record can contain fiscal year and quarter, actual dates, value, unit, accession, filing availability time, and a flag for a 53-week-year comparison. If the fiscal mapping or source period is uncertain, leave the comparison unresolved rather than filling a chart with a confident-looking mismatch.
Top comments (0)