Appendix D — Formulas Master List
Every calculation TX1 performs internally, in one place.
Resource
EffectiveBaseRate = BaseRate × AppliedFactor
DirectRate = EffectiveBaseRate
CalculatedSellRate = EffectiveBaseRate × (1 + MarkupPercentage / 100)
Built-up resource:
BuiltUpTotal = Σ (BuiltUpResourceBreakdown.Total)
where Total = Qty × ComponentResource.DirectRate
(recursive for nested breakdowns)
Direct Cost Item
DirectTotal = Quantity × ResourceRate (if no breakdowns)
DirectTotal = Σ DirectCostBreakdown.Total (if HasBreakdowns)
DirectRate = DirectTotal / Quantity (Qty ≠ 0)
TotalWithChildren = DirectTotal + Σ Children.TotalWithChildren (recursive)
RateWithChildren = TotalWithChildren / Quantity (Qty ≠ 0)
BuildUpCost = DirectTotal + ApportionedAmount
Direct Cost Breakdown
Total = Quantity × ResourceRate
TotalWithChildren = Total + Σ Children.TotalWithChildren
Overhead
Same shape as Direct Cost Item:
Total = Quantity × ResourceRate OR Σ breakdown totals
Rate = Total / Quantity
TotalWithChildren = Total + Σ Children.TotalWithChildren
OverheadPool = Σ top-level Overhead.TotalWithChildren where NOT IsOmitted
AND NOT IsNotContributing
Apportionment
Hidden source → targets:
Percentage method: target.ApportionedAmount += source.Total × target.pct / 100
FixedAmount method: target.ApportionedAmount += target.amount
Proportional auto: target.ApportionedAmount += source.Total × (target.BuildUpCost / pool.BuildUpCost)
Equal auto: target.ApportionedAmount += source.Total / targetCount
Project Pool (Allocation Basis)
Pool.BuildUpCost = Σ item.BuildUpCost
where item.PricingMode is Standard
AND NOT IsOmitted
Markup Per Type
Per-item markup, per resource type:
Item.AllocatedMarkup = Σ over resource types t:
Item.TypePortion(t) × (ProjectMarkup.XxxMarkupPercentage / 100)
+ Σ over t: ProjectMarkup.XxxMarkupAbsolute (allocated proportionally)
Where TypePortion(t) is the fraction of the item's BuildUpCost attributable to resource type t (from breakdowns or the linked resource's type).
Overhead Distribution
Item.AllocatedOverhead = (Item.BuildUpCost / Pool.BuildUpCost) × OverheadPool
(method = Proportional)
= OverheadPool / eligibleItemCount
(method = Equal)
= Item.CustomPercentage × OverheadPool
(method = Custom)
Margin Distribution
PreMarginSubtotal = DirectTotal + Σ (all markups)
RiskPool = PreMarginSubtotal × RiskMarginPercentage / 100 + RiskMarginAbsolute
CorpPool = PreMarginSubtotal × CorporateOverheadMarginPercentage / 100 + CorporateOverheadMarginAbsolute
ProfitPool = PreMarginSubtotal × ProfitMarginPercentage / 100 + ProfitMarginAbsolute
Item.AllocatedRiskMargin = Item.BuildUpCost / Pool.BuildUpCost × RiskPool
Item.AllocatedCorporateOverheadMargin = Item.BuildUpCost / Pool.BuildUpCost × CorpPool
Item.AllocatedProfitMargin = Item.BuildUpCost / Pool.BuildUpCost × ProfitPool
Total Allocated Per Item
Item.TotalAllocated = Item.AllocatedOverhead
+ Item.AllocatedMarkup
+ Item.AllocatedRiskMargin
+ Item.AllocatedCorporateOverheadMargin
+ Item.AllocatedProfitMargin
Sell Rate
Item.CalculatedSellTotal = Item.DirectTotal + Item.TotalAllocated
Item.CalculatedSellRate = Item.CalculatedSellTotal / Item.Quantity (Qty ≠ 0)
Item.MultiplicationFactor = Item.CalculatedSellRate / Item.DirectRate
Project Totals
Project.TotalDirectCosts = Σ top-level DirectCostItem.TotalWithChildren (non-omitted)
Project.TotalOverheads = Σ top-level Overhead.TotalWithChildren (non-omitted, contributing)
Project.GrandTotal = TotalDirectCosts + TotalOverheads
Project.TotalSellValue = Σ DirectCostItem.CalculatedSellTotal
Project.ProjectedMargin = TotalSellValue - GrandTotal
Project.MarginPercentage = ProjectedMargin / TotalSellValue × 100
Carbon
DirectCostEmission.TotalEmissions = Quantity × EmissionFactor
OverheadEmission.TotalEmissions = Amount × EmissionFactor
CarbonEmissionAllocation.TotalEmissions
- ResourceBased: Quantity × EmissionFactor (from linked resource)
- Formula: Evaluate(FormulaExpression)
- Manual: Direct entry
Project.TotalScope1Emissions = Σ emissions where Scope = 1
Project.TotalScope2Emissions = Σ emissions where Scope = 2
Project.TotalScope3Emissions = Σ emissions where Scope = 3
Project.TotalEmissions = Scope1 + Scope2 + Scope3
VerificationPercentage = VerifiedCount / ItemCount × 100
Carbon apportionment mirrors cost apportionment:
Item.AllocatedOverheadCarbon = (Item.DirectCarbonEmissions / Pool.DirectCarbon) × OverheadCarbonPool
(method = ProportionalToCarbon)
= OverheadCarbonPool / targetCount
(method = Equal)
Item.TotalCarbon = Item.DirectCarbonEmissions + Item.AllocatedOverheadCarbon
Code Set Allocation
CodeSetAllocation.CalculatedAmount = (AllocationPercentage / 100) × Entity.Total
CodeSetAllocation.CalculatedCarbon = (AllocationPercentage / 100) × Entity.TotalCarbon
CodeSet.TotalAllocatedAmount = Σ CalculatedAmount for this node and all descendants
CodeSet.TotalCarbonEmissions = Σ CalculatedCarbon for this node and all descendants
Resource Cascade (pseudocode)
when Resource.BaseRate or AppliedFactor or MarkupPercentage changes:
Resource.RecalculateRates()
for each DirectCostItem / DirectCostBreakdown referencing this Resource:
line.ResourceRate = Resource.DirectRate
line.Total = line.Quantity × line.ResourceRate
propagate via TotalWithChildren up parent chain
for each item changed:
re-run markup, margin, overhead allocation
refresh sell-rate view
Dependency Graph
RegisterFormula(cellId, formula):
parse → extract VAR / L# / CC references
add edge (cellId → each dependency)
WouldCreateCircularReference(cellId, formula):
simulate the new edges
DFS from cellId; if cellId revisited, return true
return false
GetEvaluationOrder():
topological sort of the graph
GetAffectedCells(cellId):
all cells reachable from cellId (dependents)
This appendix is the single source of truth for what TX1 calculates. If the software diverges from these formulas, report a defect.