# Calculator model and evidence update

Updated 27 September 2026. This document describes v1.3. The accompanying scientific audit describes the original v1.2 site; it is retained as the record of the findings, not a claim that all its defects remain present.

## Equations and inputs

`requirements.js` implements the six displayed nutrient equations from the [NRC (2007) official companion calculator](https://webassets.nationalacademies.org/nrh/): digestible energy (Mcal/day), crude protein, lysine, calcium, phosphorus and magnesium (g/day). Matching those equations does not validate their predictions for every horse.

- Maintenance: low, average and elevated DE **and protein** values. Lysine is 4.3% of requirement CP.
- Work: workload-specific repair, sweat and mineral terms. Very heavy work uses 1.9 times **elevated** maintenance DE, not average maintenance. This further discrepancy was found when implementing the audit.
- Pregnancy: enter mature/prepregnancy weight, excluding pregnancy gain. Months 1–4 use maintenance; months 5–11 have individual fetal/placental growth and mineral calculations. Forage/DMI planning remains based on the entered reference weight; clinicians should assess actual intake and pregnancy-associated weight changes.
- Lactation: select months 1–6 separately. Milk-yield fractions are 0.0326, 0.0324, 0.0299, 0.0271, 0.0244 and 0.0218 of body weight per day. The separate milk lysine term replaces the old CP-only shortcut. This is model-predicted milk production, not a measurement.
- Growth: enter current weight, actual age in years (4–36 months supported), and expected mature weight. Unlike the companion's predicted-weight default, this implementation retains the user's measured current weight. Predicted daily gain is `matureKg × 6.97121 × exp(-0.0772 × ageMonths) / 3040`; the page displays it. CP efficiency changes with age. Calcium and phosphorus include current weight and gain. Light training applies only over 12 months, and multiplies the maintenance DE component, not the growth component. At the companion's predicted weight, the numerical outputs agree. Measured gain and additional growth workloads are not inputs.

DMI bands, water and salt multipliers are **rough planning assumptions**, not additional validated NRC equations. Water is never a cap or allowance. Salt is not an instruction to add that amount without considering the existing ration and sweat losses. Body condition changes explanatory advice, not the underlying requirement equations.

## Ration calculations and limitations

- Feed amounts are daily as-fed kg or lb. A custom dry-matter analysis is multiplied by DM/100 to obtain as-fed concentrations. Percent nutrients are converted to grams; DE is in Mcal/kg.
- Custom entries require a category. Only entries explicitly classified as forage count as forage. Beet pulp and other fibre ingredients are not automatically treated as long forage or clinically adequate replacements.
- Blank nutrients remain **unknown**, including magnesium and lysine. Negative/non-finite/out-of-range entries are flagged. Missing DM makes totals incomplete. A user-entered zero is distinct from a blank.
- The 14 generic compositions have no traceable analytical provenance in the original site. They remain illustrative assumptions, labelled accordingly. Generic lysine uses a crude-protein fraction and is explicitly estimated. Forage, pasture and commercial products require actual analyses. Beet-pulp amounts refer to dry product before soaking.
- Absolute forage DM is compared with 1.5% of reference body weight, including zero-forage rations. This is a conservative starting minimum, not an absolute floor for supervised clinical diets. Grazing and replacements need careful accounting.
- Rows below 100% are labelled below estimate. Energy up to 115% can be described as meeting the estimate; the same upper bound controls the overall energy flag. Nutrient review bands (CP 200%, lysine 250%, Ca/Mg 300%, P 200%) are inherited display prompts, **not established safe upper limits**. All green results refer to the entered data/model only.
- Ca:P is evaluated with absolute amounts. Ratios outside the common 1.5–2:1 formulation target prompt review; the target is **not a toxicity boundary**. Zero phosphorus receives no reassuring ratio verdict.
- WSC + starch and ESC + starch are distinct assay sums. Mixed or unknown definitions suppress the combined percentage. No carbohydrate percentage certifies safety for insulin dysregulation or laminitis.
- **Meal allocation is not entered**, so the calculator reports daily starch and explicitly cannot assess any individual meal. The 1 g/kg/meal and 2 g/kg/day ulcer-prone guidelines are context-dependent risk-management advice.
- Sodium, chloride, potassium, trace minerals and vitamins are not assessed. This remains a partial calculator, not a complete ration formulation service.
- Existing browser-saved entries are retained. Old lactation presets map to months 1 or 4. Old custom entries require category selection and missing analyses; they do not silently inherit forage status or magnesium. Unit changes preserve six decimal places for small quantities.

## Evidence and editorial changes

All 29 educational modules and 11 mineral panels link to topic-specific references in a 52-group evidence register. The original audit includes study links, evidence types and limitations. Main corrections include vitamin D synthesis, hay-soaking variability/hygiene, WSC versus ESC, salt dose safety, PPID versus insulin dysregulation, diagnosis-specific muscle diets, acute versus chronic exercise management, Gram-negative endotoxin, molybdenum/copper uncertainty, amino acid limitations and age-related digestion. Mineral clinical signs are not diagnostic on their own. No reviewer name, qualifications or professional endorsement has been invented.

## Validation

Run `npm ci` then `npm test` with Node 20 or newer. Tests include fixed NRC reference outputs, age-sensitive growth, invalid inputs, custom-feed classification, missing nutrients, DM conversion, zero/low forage, extreme Ca:P, conflicting energy messages, unit precision, saved-ration migration and citation targets.

Interface tests execute the production scripts against a DOM using jsdom. They do not send enquiries, load remote resources, or substitute for a real-browser visual/accessibility review. A Chromium download was attempted in the editing environment but failed with a truncated archive; full visual browser testing remains outstanding.

This update improves the educational and computational accuracy. It is not independent veterinary sign-off. Clinical use still requires actual feed analyses and qualified interpretation.
