Step 4: Table calculation

Calculation applies supported inputs consistently and keeps exact work separate from the rounded comparison table. Salary targets remain market estimates; visa rules and personal minima are comparisons, not values the targets are forced to meet.

Flow

These diagrams show calculation followed by review and presentation. The exact results from the first diagram are the starting point for the second. A stop or a lack of usable inputs does not continue to review.

Inputs and calculation

Workflow diagram for Step 4: Table calculation
View full-size diagram

Review and presentation

Workflow diagram for Step 4: Table calculation
View full-size diagram

Calculation runtime

Both hosts use the bundled standard-library Python helpers, requiring Python 3.11 or later. The main conversation prepares all eligible rows and obtains their exact calculations and formatted table together, then reviews them against saved sources. It does not need separate calculation calls for every country first. The saved table still receives an independent check against those inputs before the step completes.

These are fixed helpers shipped with Compass. The agent does not generate a wrapper or arithmetic program during the search. Research quality, visa comparability, skipped countries and any evidence-supported revision remain decisions for the agent to assess and explain.

If execution is unavailable, you choose repair or a disclosed manual fallback. Invalid data still needs clarification or a skip; missing package files need repair. The saved work identifies which calculation method actually ran.

Calculation rules

Each tier uses its own researched Realistic amount, not an average derived from its Low and Strong values:

Annual Target = Realistic amount × (1 − typical Adjustment %)
Monthly Reference = unrounded Annual Target ÷ 12

Both tiers need comparable salary benchmarks. A supported numeric adjustment, including a supported zero, produces adjusted estimates. If that adjustment is not estimable, the researched Realistic amounts continue unchanged as local-market references. Their overseas adjustment remains unverified. Only unusable salary data causes a skip; the workflow does not invent a tier or ask for manual evidence or another research attempt.

Displayed annual values round to the nearest 500 and monthly references to the nearest 50, halfway upward. Both come independently from raw values. For a fictional Realistic amount of 80,000 and adjustment of 7%, the raw annual target is 74,400 and monthly reference is 6,200; their displays are 74,500 and 6,200. Dividing the displayed annual figure would produce a different monthly calculation.

Automatic negotiation ranges are not generated from these point estimates. The original Low, Realistic and Strong evidence remains in research.

Visa salary rule comparison

Compare raw targets using the rule’s original pay period and candidate category. Monthly rules require official evidence that the annual base and pay schedule support the intended monthly comparison; otherwise show Unknown and retain the known rule in the work.

Display Interpretation
Amount with /yr or /mo A verified candidate-applicable numeric salary rule.
No fixed minimum Other wage conditions can still apply.
Not applicable A confirmed path outside employer-sponsored relocation.
Unknown The rule or comparable pay basis is unverified.
Blocked Official evidence makes the assessed route unavailable to this candidate.

One warning marks a shortfall in at least one tier. Equality passes that numeric comparison, not overall eligibility. A salary shortfall and a Blocked route remain different facts.

Table format and ordering

The saved table keeps Country, Visa salary rule, Mainstream Annual, Premium Annual, Mainstream Monthly and Premium Monthly in that order. Salaries use local-currency numbers; sources, dates and explanations stay in shown work and Summary.

Use compatible Country Finder priority order when available, appending user-added countries alphabetically. Otherwise use alphabetical order. Optional ordering never blocks calculation or removes a target.

Hard-floor flag

A raw Mainstream target below a confirmed personal hard floor is flagged in Summary only. Currency, period and gross/net basis must be comparable, with dated conversion evidence when required. Unknown comparison stays unverified. Neither the personal floor nor a visa rule raises either market target.

What happens next

The saved record includes raw work, independently rounded displays, calculated/skipped counts and every known target’s outcome. Chat shows counts at this step; Final verification presents the audited table.

If no comparable salary benchmark can be calculated, save the skip-only outcome and end without requesting more evidence. Do not present an empty table or ask for a career ladder.

Explore the source

For implementation details, read prompts/salary-calculator/step4-table-calculation.md.