Calculator QA

Calculator Error States: A Contract for Inputs, Results and Delivery

Separate correctable input errors, unsupported scenarios, calculation failures, stale results and delivery failures with a twelve-case recovery contract.

Direct answer

A calculator should distinguish at least six public classes: input error, unsupported state, calculation unavailable, stale result, delivery failure and eligibility state. Give each class a stable state code, plain-language message, preserved-input rule, result-visibility rule, recovery action and accessible focus target. Never clear a valid result because email or CRM delivery failed, and never label a valid negative outcome as a technical error.

Definition

A calculator error-state contract is the documented mapping from each failure condition to the state code, public message, preserved data, result status, recovery action, focus behavior and safe retry rule exposed by the interface and connected systems.

Key findings

Verified 27 November 2026

  • A calculator needs separate state codes for input, unsupported, unavailable, stale and delivery conditions because each has a different safe recovery action.
  • A calculation success must remain visible when email, CRM or another delivery step fails. A delivery retry should reuse the same result revision and idempotency key.
  • Negative ROI, no break-even point and policy ineligibility can be valid outcomes. They should not be rewritten as calculation failures.
  • Accessible recovery requires text that identifies the problem, preserved input, a consistent focus target and field-level messages linked to the affected controls.

What is a calculator error-state contract?

A calculator error-state contract maps a detected condition to everything the interface, API, analytics and operational systems expose. It prevents an invalid field, formula exception, stale saved result and CRM outage from collapsing into one generic message.

For every state, document the stable code, severity, whether input remains valid, whether a result exists or is stale, the safe recovery action, the focus target, retry rules and the minimum non-sensitive diagnostic. Message wording can improve later without changing the behavioral contract.

CALCULATOR-ERROR-STATE-FIXTURES

Which calculator failure classes should be separate?

The six classes below are a reusable baseline. A product may need stricter subtypes, but combining them removes information a user or support agent needs to recover safely.

Calculator error-state classes and safe recovery
ClassExamplePublic resultRecovery
Input errorA required amount is missingNo new resultIdentify and correct the field
Unsupported stateContribution and compounding periods have no declared conversionNo guessed resultChange assumptions or add a rule
Calculation unavailableA formula dependency failsLast result absent or clearly staleRetry only when safe, otherwise contact support
Stale resultThe formula version changed after a scenario was savedOld result remains labeled staleRecalculate before new delivery
Delivery failureThe result is valid but email or CRM delivery failsValid result remains visibleRetry the same revision idempotently
Eligibility stateThe scenario falls outside a product policyBoundary explanationReview the policy or request human review

How should input errors work?

Identify the affected field in text, explain the problem and state the correction. Preserve every other value. If several fields fail together, use a consistent error summary that links to each corresponding control and keep an inline message beside every affected field.

W3C Error Identification requires an automatically detected input error to identify the item and describe the error in text. W3C form guidance also says custom validation must notify users accessibly and that server-side validation is still required because client-side checks can be bypassed.

GOV.UK's validation pattern keeps the submitted values, adds Error to the page title, places an error summary at the top and moves keyboard focus to it. Its error-summary component links to the affected answers and keeps summary wording consistent with inline messages. These are implementation patterns, not a universal requirement to copy GOV.UK styling.

Sources: W3C Understanding Error Identification; W3C form validation; GOV.UK validation pattern; GOV.UK error summary

What should happen when calculation fails?

Do not replace the last valid result with zero. Zero is a numeric answer, not an error placeholder. Mark the prior result stale or unavailable, keep its assumptions visible and offer retry only when the same operation can run safely without creating duplicate downstream effects.

An unsupported rule is not a temporary outage. Repeating the same request will not fix a missing frequency conversion, undefined tier or contradictory eligibility rule. Tell the user which assumption must change or which declared rule is missing.

Keep exception traces and raw payloads out of the public message. A support reference can locate a server log, but the reference itself should not contain an email address, full input payload, token or other personal data.

How are calculation and delivery failures different?

A calculator can produce a valid result while email, CRM or webhook delivery fails. The page should keep the calculated result visible and state that delivery is pending or failed. Clearing the result or saying calculation failed creates a false account of what happened.

A safe delivery retry reuses the same immutable result revision and idempotency key. It must not silently recalculate under a newer formula or create a second contact, email or payment record for the same request.

Result and delivery combinations
CalculationDeliveryPublic state
ValidNot requestedComplete
ValidPendingResult available, delivery pending
ValidFailedResult available, delivery failed, safe retry offered
Invalid or unsupportedNot attemptedCorrect input or change assumptions
StalePreviously deliveredRecalculate before any new delivery

Worked example: the quote succeeds but email fails

A fictional service quote calculates $8,400 with formula version 3 and stores immutable result revision R17. The browser displays the amount, then the requested email provider times out. The correct public state keeps $8,400 visible, labels email delivery failed and offers a retry of R17 with the original idempotency key.

The incorrect state clears the result, says the calculation failed or recalculates under a newer formula during delivery retry. Any of those responses can make the browser, email and CRM disagree about one interaction.

What did the twelve deterministic fixtures cover?

The executed suite locks the state code, result visibility, recovery action, focus target and preserved-input rule. It tests behavior rather than exact prose so copy can improve without weakening the contract.

The final diagnostic fixture also asserts that a public support reference contains no personal data. Products with regulated estimates, payments or durable saved scenarios should add domain-specific audit and reversal cases.

Twelve executed calculator error-state fixtures
CaseConditionExpected public decision
ES01One required field is missingInput error, focus field, preserve input
ES02Several fields are invalidInput error, focus linked summary, preserve input
ES03The scenario has no declared calculation ruleUnsupported state, change assumptions
ES04The engine returns a non-finite resultCalculation unavailable, do not display zero
ES05A temporary dependency fails before side effectsCalculation unavailable, safe retry
ES06A saved result uses an older formula versionStale result remains labeled, recalculate
ES07Calculation succeeds but delivery failsValid result remains visible, retry delivery
ES08Delivery retry repeats the requestReuse the same result revision and idempotency key
ES09ROI is negativeValid negative result, not an error
ES10No break-even point exists under the assumptionsValid boundary result, review assumptions
ES11The scenario is outside a product policyEligibility state, not a technical error
ES12Support needs a diagnostic referenceNon-sensitive reference only

Which release checks should be required?

Test field association, summary links, keyboard focus, preserved values, state code, result visibility, retry eligibility and idempotency separately. A screenshot can confirm appearance, but it cannot prove the recovery rule or prevent duplicate delivery.

Log the result revision, formula version, state code and a non-sensitive correlation identifier. Do not place full inputs or personal details in analytics merely to make debugging easier. Reconcile the browser result with each requested delivery channel after retry.

Limitations, verification and corrections

Recovery behavior depends on the product's risk, persistence and delivery architecture. A regulated estimate or payment flow may require stricter blocking, review, audit and reversal controls than a public marketing calculator. This contract does not replace legal, security or accessibility review and does not prescribe a universal retry interval.

W3C Error Identification and form-validation guidance plus the GOV.UK validation and error-summary patterns were rechecked on 27 November 2026. Recheck the primary guidance and rerun all fixtures after any validation, focus, result persistence, delivery, retry or diagnostic-data change.

To request a correction, identify the affected state, reproducible steps, expected recovery and a primary source or fixture. A material correction updates the modified date; rechecking a source alone does not change the original publication date.

Sources: Corrections policy

Method and evidence

Evidence type: Six-class failure model, worked quote-delivery example and twelve executed deterministic recovery fixtures

  1. Separated user-correctable input problems from unsupported scenarios, unavailable calculations, stale results, delivery failures and eligibility outcomes.
  2. Specified the result visibility, preserved input, recovery action and focus target for each state instead of testing message copy alone.
  3. Kept valid unfavorable outcomes, such as negative ROI or no break-even point, out of the technical-error class.
  4. Executed twelve deterministic fixtures and rechecked current W3C and GOV.UK guidance on 27 November 2026.

Topic score: 4.55 / 5. Business fit 4.8, verified demand 4.1, distinct intent 4.8, original evidence 4.8, citation usefulness 4.6, feasibility 4.6.

Primary sources

  • W3C Understanding Error Identification ↗Primary WCAG 2.2 explanation for identifying the affected item and describing an automatically detected input error in text; checked 27 November 2026.
  • W3C WAI: Validating Input ↗Primary accessibility guidance for accessible validation and server-side validation; checked 27 November 2026.
  • GOV.UK validation pattern ↗Government design-system pattern for preserving values, error titles, summaries, focus and field messages; checked 27 November 2026.
  • GOV.UK error summary ↗Government component guidance for focus, linked errors and consistent summary wording; checked 27 November 2026.

Limitations

  • The six classes are a reusable baseline, not a complete state model for every regulated, transactional or safety-critical calculator.
  • The fictional $8,400 quote illustrates state handling. It is not a benchmark, customer result or measured delivery test.
  • The accessibility patterns need testing with the product's actual controls, browser support and assistive-technology combinations.
  • Retry timing, log retention, audit evidence and escalation ownership depend on the calculator's delivery architecture and risk.

Verification and corrections

W3C error-identification and form-validation guidance plus GOV.UK validation and error-summary patterns verified 27 November 2026.

Recommended retest: Recheck after any validation, focus, formula execution, result persistence, delivery, retry or diagnostic-data change.

Found an error or a changed standard? Use the correction process and include the page URL and primary evidence.

Next step

Apply the evidence to your next release

Use the published method, keep a dated test record and revisit the result after the calculator or its operating rules change.

Open the testing protocol