Skip to content

Main content

PK Research Compartment Mass Balance Residual Tool

Calculate pk research compartment mass balance residual from explicit caller-supplied inputs.

Loading tool…

Description

For nonnegative compartment amounts return expectedClosing=opening+input-eliminated-transferredOut+transferredIn, residual=measuredClosing-expectedClosing, and totalOut=eliminated+transferredOut.

Pharmacokinetic research describes concentration over time using measurement units and an explicit model. Concentration-time area, its time-weighted moment, inverse-time rate constants, clearance, and volume are related but distinct quantities. A conversion or local model term does not estimate every parameter or validate a complete study.

For nonnegative compartment amounts return expectedClosing=opening+input-eliminated-transferredOut+transferredIn, residual=measuredClosing-expectedClosing, and totalOut=eliminated+transferredOut.

When to use this tool

Use PK Research Compartment Mass Balance Residual when you need this concentration-time conversion, sampling check, local integral panel, or explicitly supplied kinetic-model term.

How to use the tool and how it works

  1. Enter opening, input, eliminated, transferredOut, transferredIn, measuredClosing. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read expectedClosing, residual, totalOut. Use the output convention below.

For nonnegative compartment amounts return expectedClosing=opening+input-eliminated-transferredOut+transferredIn, residual=measuredClosing-expectedClosing, and totalOut=eliminated+transferredOut.1

Input fieldMeaning and unitsAccepted input
openingOpeningRequired. Finite number; minimum 0.
inputInputRequired. Finite number; minimum 0.
eliminatedEliminatedRequired. Finite number; minimum 0.
transferredOutTransferred OutRequired. Finite number; minimum 0.
transferredInTransferred InRequired. Finite number; minimum 0.
measuredClosingMeasured ClosingRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
expectedClosingExpected ClosingRequired. Finite number.
residualSigned observed-minus-implied discrepancy under the stated formula.Required. Finite number.
totalOutTotal OutRequired. Finite number.
json
{
  "input": {
    "opening": 100,
    "input": 20,
    "eliminated": 30,
    "transferredOut": 10,
    "transferredIn": 5,
    "measuredClosing": 84
  },
  "output": {
    "expectedClosing": 85,
    "residual": -1,
    "totalOut": 40
  }
}

Limitations and assumptions

  • Amounts need one unit and interval boundary. ExpectedClosing may be negative because total outflow is not capped; the residual does not locate a missing transfer or validate a biological compartment model.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.

Alternative or Complementary methods

Use a complete study analysis when a local panel, transformation, or model factor is insufficient. Check sampling times, censoring, assay support, unit conventions, and the validity of the assumed kinetic regime.

References

  1. Calculation and input contract: pharmacokinetics/pk-research-compartment-mass-balance-residual — tool.io

Similar or alternative tools