The quarterly figure is usually tagged CostOfRevenue in XBRL, the aggregate cost of goods produced and sold and services rendered in the period. Some companies tag a narrower CostOfGoodsAndServicesSold line instead, or split product and service costs into separate lines. Regulation S-X Rule 5-03.2 asks companies to break this caption into the cost of tangible goods sold, operating expenses of utilities, expenses tied to rental income, cost of services, and expenses tied to other revenues.
Income statements in a 10-Q show both the latest quarter and the fiscal year to date, but there is no separate fourth-quarter filing. The fourth quarter is therefore derived as the 10-K annual amount minus the nine-month year-to-date amount from the third-quarter 10-Q, and the TTM total is the sum of the latest four quarters built that way. Summing four quarters that each come from the same element keeps the figure consistent with TTM revenue, as long as the company has not changed how it classifies costs during the year.
TTM cost of revenue is most useful next to TTM sales. Subtracting it gives TTM gross profit, and dividing that by TTM sales gives a gross margin that is current but not distorted by a single seasonal quarter. It is also the numerator of inventory turnover and the base for days inventory outstanding. Comparisons across companies need care, since some include depreciation or occupancy costs in cost of revenue and others report them elsewhere.