Source: https://guthlabs.ai/docs/instruments/mole-fraction-mole-percent-calculator/implementation/

instrument implementation / implementation-contract

# Mole Fraction / Mole Percent Calculator implementation

A source-bound implementation contract for Mole Fraction / Mole Percent Calculator; deployment and executable qualification remain separate.

Status: **VERIFIED_CLEAN**Lifecycle: **implementation-contract**

## Binding contract

This record describes what an executable surface must bind and validate. It does not claim that a public calculator, package, or production route is deployed.

**Record owner**: Guth Instruments

**Lifecycle**: verified-clean

**Evidence ID**: t4-015

**Effect**: Computation or source lookup only

## Input and validation requirements

- If all component amounts are zero, Σn = 0 and every mole fraction requires division by zero; the calculator must reject this input.

- Negative amounts are physically invalid and must be rejected.

- A zero molar mass causes division by zero in mass-to-mole conversion and must be rejected.

- Incompatible mass and molar-mass units produce incorrect results unless converted first.

- Floating-point rounding can make the displayed Σx differ slightly from 1; the check should use a documented tolerance.

## Required corrections

No binding erratum is attached to this unique-name record. Implementers must still preserve the declared units, domain, and failure behavior.

## Inspectable interface fixture

The sample below is evidence for interface and validation tests, not a production implementation.

````
{
  "inputs": {
    "mode": "moles",
    "components": {
      "ethanol": 2,
      "water": 8
    }
  },
  "expected_outputs": {
    "x_ethanol": 0.2,
    "x_water": 0.8,
    "sum_x": 1
  },
  "working": "1. Sum the amounts: Σn = 2.0 mol + 8.0 mol = 10.0 mol. 2. Ethanol: x = 2.0/10.0 = 0.2. 3. Water: x = 8.0/10.0 = 0.8. 4. Check: Σx = 0.2 + 0.8 = 1.0."
}
````

## Other records

[01**Overview**](<https://guthlabs.ai/docs/instruments/mole-fraction-mole-percent-calculator/>)[02**Mechanism**](<https://guthlabs.ai/docs/instruments/mole-fraction-mole-percent-calculator/mechanism/>)[04**Qualification**](<https://guthlabs.ai/docs/instruments/mole-fraction-mole-percent-calculator/qualification/>)

## Sources and evidence

These pointers bind the page to evidence. They do not grant authority or collapse verification into deployment.

- `VERIFIED_LEDGER.json`

- `evidence-tranche4/tranche4-results.json`
