Calculations 1.1

Candidate Recommendation 16 February 2022

This version
https://www.xbrl.org/Specification/calculation-1.1/CR-2022-02-16/calculation-1.1-CR-2022-02-16.html
Editor
Paul Warren, XBRL International <pdw@xbrl.org>
Contributors
Mark Goodhand <mrg@corefiling.com>
Brett Kail <brett.kail@workiva.com>

Table of Contents

Definitions

Error codes

1 Abstract

1.1 Background

XBRL v2.1 provides a mechanism for defining the calculation relationships that exist between XBRL Concepts, and a process for checking whether the facts in an XBRL Report are consistent with those relationships. The consistency checking process has a number of deficiencies, which can cause erroneous consistency failures on rounded values, and missed consistency failures where duplicate facts are present.

This specification defines alternative calculation functionality intended to address these deficiencies.

2 Overview

This specification defines a process for checking the calculation consistency of facts in an XBRL report with relationships defined in an XBRL taxonomy, and prescribes error codes to be raised if a report is found to be inconsistent (see Section 4.2).

The calculation relationships can be defined using either the existing "summation-item" arcrole defined by the XBRL v2.1 Specification or a new arcrole defined by this specification (see Section 3.1). The behaviour defined by this specification is the same for both arcroles, but the new arcrole is not subject to the calculation consistency checking behaviour defined by XBRL v2.1.

2.1 Namespaces and namespace prefixes

Prefix Namespace URI
calc11 http://xbrl.org/CR/2022-02-16/calculation-1.1
calc11e http://xbrl.org/CR/2022-02-16/error
link http://www.xbrl.org/2003/linkbase
xbrli http://www.xbrl.org/2003/instance
xl http://www.xbrl.org/2003/XLink
xlink http://www.w3.org/1999/xlink

2.2 Error codes

QNames in parenthetical red text after a "MUST" or "MUST NOT" statement prescribe standardised error codes to be used if the preceding condition is violated. "MUST" or "MUST NOT" statements that do not have a prescribed error code are not automatically enforceable, and processors are not required to detect violations.

2.3 Validation status

This specifications defines error codes that MUST be raised by a conformant processor when calculation inconsistencies are detected. Calculation inconsistency errors do not render an XBRL report invalid, and processors MAY continue processing documents containing such errors.

3 Calculation definition

3.1 Summation-item relationships

A summation-item relationship is an effective relationship defined by a calculationArc element with an arcrole of http://www.xbrl.org/2003/arcrole/summation-item or https://xbrl.org/CR/2022-02-16/arcrole/summation-item .

An effective relationship is an XLink relationship that has not been prohibited or overridden by an arc with a higher priority, as described in XBRL v2.1 section 3.5.3.9.7.

XBRL v2.1 prescribes behaviour for the http://www.xbrl.org/2003/arcrole/summation-item arcrole ("XBRL v2.1 calculation semantics"), requiring processors to "signal an inconsistency" under certain conditions. This specification does not alter that requirement but prescribes additional error codes that must be raised ("Calculations v1.1 semantics"). Such errors raised under either specification do not invalidate an XBRL Report, and users and integrators of XBRL processors are free to choose if and how they are handled.

Entities that accept XBRL Reports as part of a filing system should make it clear which calculation semantics will be applied, and how they will be handled.

Inconsistencies raised under Calculation v1.1 semantics are primarily a subset of those raised under XBRL v2.1 calculation semantics, although Calculations v1.1 additionally permits checking of calculations involving some classes of duplicate facts.

XBRL v2.1 prescribes no behaviour for the https://xbrl.org/CR/2022-02-16/arcrole/summation-item arcrole, and XBRL v2.1 calculation semantics must not be applied to it.

3.2 Calculation structure

Calculations are defined in a taxonomy using summation-item relationships.

A calculation is the set of all summation-item relationships sharing a common total concept, a common extended link role, and a common arcrole (see Section 3.1).

4 Calculation application

A report can be checked for consistency with a set of calculations, and an error is raised wherever the reported facts are inconsistent with the defined calculations. Each calculation is checked wherever there are sufficient dimensionally aligned facts for it to "bind", as described in Section 4.1.

4.1 Calculation binding

A reported data point is a set of dimension values for which there exists at least one fact with that set of dimension values as its {dimensions} property and that has a non-nil value. The OIM definition of equal dimension value is used when comparing dimension values.

A calculation binds wherever the following conditions are met:

Two reported data points, a and b, are dimensionally aligned if for every dimension other than the concept core dimension in the {dimensions} property of a, the same dimension is present in b with an equal dimension value.

4.2 Consistency checking

Where a calculation binds, the consistency of the calculation is determined as follows:

The error code calc11e:inconsistentCalculation MUST be raised for each binding of a calculation that is not consistent.

4.2.1 Fact value interval

The fact value interval for a fact is the range of possible values that the reported fact value is consistent with having been rounded from, allowing for a "half" value to have been rounded either up or down. For a fact with {value} v, and finite {decimals} property d, it is defined as:

[v-0.5*10^(0-d), v+0.5*10^(0-d)]

For a fact with a {decimals} property of "infinity", it is defined as the single point interval:

[v, v]

For example, a fact with a value of 5,000 and decimals = -3 represents an interval of:

  [5000 - 0.5 * 10^3, 5000 + 0.5 * 10^3] 
= [5000 - 500, 5000 + 500]
= [4500, 5500]

Note that all intervals used in this specification are "closed", meaning that they include both the upper and lower bound. The above example indicates that the reported value of 5,000 (decimals = -3) is consistent with having been rounded (down) from 5,500. A reported value of 6,000 (decimals = -3) is also considered consistent with having been rounded (up) from 5,500, even though under any single rounding method only one of these can be correct.

Two intervals are still considered to overlap where the upper bound of one interval is equal to the lower bound of the other, for example [4500, 5500] and [5500, 6500].

The use of closed intervals allows consistency checking to be performed without knowing the rounding method used, but makes the check lax on certain edge cases.

4.3 Handling of consistent duplicates

Where consistent duplicates are present, the calculation is performed using the intersection of fact value intervals for all facts within the set. For example, if we have the following consistent duplicates and intervals:

5000 (decimals = -3) => [4500, 5500]
5500 (decimals = -2) => [5450, 5550]

These facts are consistent with having been rounded from a value in the range [5450, 5500], so this is the interval used for the calculation.

Where a reported data point has only a single fact (no duplicates) the calculation is performed with that fact's fact value interval.

4.4 Handling of inconsistent duplicates

This specification requries an error to be raised wherever a calculation binds to a reported data point that has two facts that are inconsistent duplicates (Section 4.2).

Other specifications, or local filing rules, may require that all facts in the report are consistent duplicates, or complete duplicates, in which case the consistency checking required by this specification is redundant.

A set of duplicates containing only nil values is considered consistent, but is ignored for the purposes of calculation binding and consistency checking. Any set of duplicates containing a mixture of nil and non-nil values is considered inconsistent, and an error must be raised if it is included in a binding calculation.

4.5 Interval arithmetic

The process described above requires two interval arithmetic operations: multiplication and addition.

Addition of two intervals, is defined as:

[x1, x2] + [y1, y2] = [x1 + y1, x2 + y2]

The required multiplication is between an interval from a contributing fact, [x1, x2], and the contribution weight, w, which is effectively a single point interval, [w, w]. The required calculation is:

[x1, x2] * [w, w] =  [min(x1 * w, x2 * w), max(x1 * w, x2 * w)]

Appendix A Intellectual property status (non-normative)

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to XBRL International or XBRL organizations, except as required to translate it into languages other than English. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (https://www.xbrl.org/legal).

This document and the information contained herein is provided on an "AS IS" basis and XBRL INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

The attention of users of this document is directed to the possibility that compliance with or adoption of XBRL International specifications may require use of an invention covered by patent rights. XBRL International shall not be responsible for identifying patents for which a license may be required by any XBRL International specification, or for conducting legal inquiries into the legal validity or scope of those patents that are brought to its attention. XBRL International specifications are prospective and advisory only. Prospective users are responsible for protecting themselves against liability for infringement of patents. XBRL International takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Members of XBRL International agree to grant certain licenses under the XBRL International Intellectual Property Policy (https://www.xbrl.org/legal).