Skip to content

Your money stays on this device. Nothing is saved in the cloud. AI features only see what you ask them to read.

til loan day

Engine selftest

Both engines run here in your browser on fixed inputs and are checked against values pinned by exact reference implementations.

28/28 PASS

Til Loan Day runway

14/14 PASS

Demo on Fri 20 Nov 2026: £400 balance, £500 overdraft, £6.50 a day, three bills, loan day Mon 18 Jan. Pairs are [before, after] a plan. Money in pence.

  • R1Base demo: £400, £6.50 a day, three bills

    PASS
    Expected
    {"days": 59, "billsInWindowPence": 6800, "safeDailyPence": 562, "firstOverdraftDate": "2027-01-10", "firstExhaustedDate": null, "endBalancePence": -5150, "daysEarly": 8, "statusCounts": {"own": 51, "overdraft": 8, "exhausted": 0}}
    Actual
    {"days": 59, "billsInWindowPence": 6800, "safeDailyPence": 562, "firstOverdraftDate": "2027-01-10", "firstExhaustedDate": null, "endBalancePence": -5150, "daysEarly": 8, "statusCounts": {"own": 51, "overdraft": 8, "exhausted": 0}}
  • R2+ Winter ball £55 on Fri 4 Dec

    PASS
    Expected
    {"verdict": "overdraft", "causesOverdraft": false, "safeDailyPence": [562, 469], "safeDailyDeltaPence": -93, "firstOverdraftDate": ["2027-01-10", "2027-01-03"], "daysEarlierOverdraft": 7, "endBalancePence": [-5150, -10650]}
    Actual
    {"verdict": "overdraft", "causesOverdraft": false, "safeDailyPence": [562, 469], "safeDailyDeltaPence": -93, "firstOverdraftDate": ["2027-01-10", "2027-01-03"], "daysEarlierOverdraft": 7, "endBalancePence": [-5150, -10650]}
  • R3+ Christmas meal £28 on Thu 10 Dec

    PASS
    Expected
    {"verdict": "overdraft", "causesOverdraft": false, "safeDailyPence": [562, 515], "safeDailyDeltaPence": -47, "firstOverdraftDate": ["2027-01-10", "2027-01-05"], "daysEarlierOverdraft": 5, "endBalancePence": [-5150, -7950]}
    Actual
    {"verdict": "overdraft", "causesOverdraft": false, "safeDailyPence": [562, 515], "safeDailyDeltaPence": -47, "firstOverdraftDate": ["2027-01-10", "2027-01-05"], "daysEarlierOverdraft": 5, "endBalancePence": [-5150, -7950]}
  • R4+ Ski trip deposit £450 on Sat 12 Dec

    PASS
    Expected
    {"verdict": "exhausted", "safeDailyPence": [562, 0], "firstOverdraftDate": ["2027-01-10", "2026-12-12"], "daysEarlierOverdraft": 29, "firstExhaustedDate": [null, "2027-01-17"], "endBalancePence": [-5150, -50150]}
    Actual
    {"verdict": "exhausted", "safeDailyPence": [562, 0], "firstOverdraftDate": ["2027-01-10", "2026-12-12"], "daysEarlierOverdraft": 29, "firstExhaustedDate": [null, "2027-01-17"], "endBalancePence": [-5150, -50150]}
  • R5+ Gig £30 on Wed 20 Jan (after loan day)

    PASS
    Expected
    {"verdict": "outside-window", "causesOverdraft": false, "safeDailyDeltaPence": 0, "endBalanceDeltaPence": 0, "daysEarlierOverdraft": 0}
    Actual
    {"verdict": "outside-window", "causesOverdraft": false, "safeDailyDeltaPence": 0, "endBalanceDeltaPence": 0, "daysEarlierOverdraft": 0}
  • R6Usual spend £5.62: the safe amount really is safe

    PASS
    Expected
    {"safeDailyPence": 562, "firstOverdraftDate": null, "endBalancePence": 42}
    Actual
    {"safeDailyPence": 562, "firstOverdraftDate": null, "endBalancePence": 42}
  • R7Usual spend £5.63: 1p over safe

    PASS
    Expected
    {"firstOverdraftDate": "2027-01-17", "endBalancePence": -17, "daysEarly": 1}
    Actual
    {"firstOverdraftDate": "2027-01-17", "endBalancePence": -17, "daysEarly": 1}
  • R8Balance £50, spend £0: bills alone go below £0

    PASS
    Expected
    {"safeDailyPence": 0, "billsAloneOverdraftDate": "2026-12-17", "firstOverdraftDate": "2026-12-17", "endBalancePence": -1800}
    Actual
    {"safeDailyPence": 0, "billsAloneOverdraftDate": "2026-12-17", "firstOverdraftDate": "2026-12-17", "endBalancePence": -1800}
  • R9Loan day is today

    PASS
    Expected
    {"ok": false, "reason": "loan-date-not-after-today"}
    Actual
    {"ok": false, "reason": "loan-date-not-after-today"}
  • R10Spend £4.00 + Winter ball: still fine

    PASS
    Expected
    {"verdict": "fine", "safeDailyPence": [562, 469], "endBalancePence": [9600, 4100]}
    Actual
    {"verdict": "fine", "safeDailyPence": [562, 469], "endBalancePence": [9600, 4100]}
  • R11Spend £5.00 + Winter ball: tips you into your overdraft

    PASS
    Expected
    {"verdict": "overdraft", "causesOverdraft": true, "firstOverdraftDate": [null, "2027-01-14"], "endBalancePence": [3700, -1800]}
    Actual
    {"verdict": "overdraft", "causesOverdraft": true, "firstOverdraftDate": [null, "2027-01-14"], "endBalancePence": [3700, -1800]}
  • R12Demo (£350, loan Mon 11 Jan) + £60 every Saturday

    PASS
    Expected
    {"incomeInWindowPence": 48000, "safeDailyPence": 1404, "firstOverdraftDate": null, "endBalancePence": 42400}
    Actual
    {"incomeInWindowPence": 48000, "safeDailyPence": 1404, "firstOverdraftDate": null, "endBalancePence": 42400}
  • R13Demo + £50 one-off on Tue 1 Dec

    PASS
    Expected
    {"incomeInWindowPence": 5000, "safeDailyPence": 638, "firstOverdraftDate": "2027-01-10", "endBalancePence": -600, "daysEarly": 1}
    Actual
    {"incomeInWindowPence": 5000, "safeDailyPence": 638, "firstOverdraftDate": "2027-01-10", "endBalancePence": -600, "daysEarly": 1}
  • R14Demo + £200 on loan day itself: outside the window, no change

    PASS
    Expected
    {"incomeInWindowPence": 0, "safeDailyPence": 542, "firstOverdraftDate": "2027-01-04", "endBalancePence": -5600}
    Actual
    {"incomeInWindowPence": 0, "safeDailyPence": 542, "firstOverdraftDate": "2027-01-04", "endBalancePence": -5600}

Dibs fair split

14/14 PASS

Expected values were computed independently with exact fractions. Rooms: 0 Box, 1 Middle, 2 Big double. Persons: 0 You, 1 Sam, 2 Alex. Money in pence.

  • T1Defaults, no limits

    PASS
    Expected
    {"roomOf": [0, 1, 2], "pricePence": [9200, 11000, 12800], "maxGainPence": 0, "binding": [], "verified": true}
    Actual
    {"roomOf": [0, 1, 2], "pricePence": [9200, 11000, 12800], "maxGainPence": 0, "binding": [], "verified": true}
  • T2Default demo: You £120, Sam £104

    PASS
    Expected
    {"roomOf": [0, 1, 2], "pricePence": [9500, 10400, 13100], "maxGainPence": 0, "binding": [1], "verified": true}
    Actual
    {"roomOf": [0, 1, 2], "pricePence": [9500, 10400, 13100], "maxGainPence": 0, "binding": [1], "verified": true}
  • T3Alex limit £125

    PASS
    Expected
    {"roomOf": [0, 1, 2], "pricePence": [9350, 11150, 12500], "maxGainPence": 0, "binding": [2], "verified": true}
    Actual
    {"roomOf": [0, 1, 2], "pricePence": [9350, 11150, 12500], "maxGainPence": 0, "binding": [2], "verified": true}
  • T4Alex limit £122

    PASS
    Expected
    {"roomOf": [0, 1, 2], "pricePence": [9500, 11300, 12200], "maxGainPence": 0, "binding": [2], "verified": true}
    Actual
    {"roomOf": [0, 1, 2], "pricePence": [9500, 11300, 12200], "maxGainPence": 0, "binding": [2], "verified": true}
  • T5Alex limit £120: Alex 34p short

    PASS
    Expected
    {"feasible": false, "shortfall": {"kind": "person", "person": 2, "shortByPence": 34, "minLimitPence": 12034}}
    Actual
    {"feasible": false, "shortfall": {"kind": "person", "person": 2, "shortByPence": 34, "minLimitPence": 12034}}
  • T6Sam limit £100: Sam 67p short

    PASS
    Expected
    {"feasible": false, "shortfall": {"kind": "person", "person": 1, "shortByPence": 67, "minLimitPence": 10067}}
    Actual
    {"feasible": false, "shortfall": {"kind": "person", "person": 1, "shortByPence": 67, "minLimitPence": 10067}}
  • T7All limits £100: limits add to £300

    PASS
    Expected
    {"feasible": false, "shortfall": {"kind": "limits-sum", "limitsTotalPence": 30000, "rentPence": 33000}}
    Actual
    {"feasible": false, "shortfall": {"kind": "limits-sum", "limitsTotalPence": 30000, "rentPence": 33000}}
  • T8You +40 / +40

    PASS
    Expected
    {"roomOf": [1, 0, 2], "pricePence": [8322, 11856, 12822], "maxGainPence": 0, "binding": [], "verified": true}
    Actual
    {"roomOf": [1, 0, 2], "pricePence": [8322, 11856, 12822], "maxGainPence": 0, "binding": [], "verified": true}
  • T9You −50 / +110 (extreme)

    PASS
    Expected
    {"roomOf": [2, 1, 0], "pricePence": [6467, 9167, 17366], "maxGainPence": 0, "binding": [], "verified": true}
    Actual
    {"roomOf": [2, 1, 0], "pricePence": [6467, 9167, 17366], "maxGainPence": 0, "binding": [], "verified": true}
  • T10Everyone identical (0, 0, +1): 1p rounding

    PASS
    Expected
    {"roomOf": [0, 1, 2], "pricePence": [10967, 10967, 11066], "maxGainPence": 1, "binding": [], "verified": true}
    Actual
    {"roomOf": [0, 1, 2], "pricePence": [10967, 10967, 11066], "maxGainPence": 1, "binding": [], "verified": true}
  • T2aChallenge You → Big double

    PASS
    Expected
    {"costDiffPence": 3600, "worthDiffPence": 2500, "betterOffStayingPence": 1100, "overLimitPence": 1100}
    Actual
    {"costDiffPence": 3600, "worthDiffPence": 2500, "betterOffStayingPence": 1100, "overLimitPence": 1100}
  • T2bChallenge You → Middle room

    PASS
    Expected
    {"costDiffPence": 900, "worthDiffPence": 500, "betterOffStayingPence": 400, "overLimitPence": 0}
    Actual
    {"costDiffPence": 900, "worthDiffPence": 500, "betterOffStayingPence": 400, "overLimitPence": 0}
  • T2cSettle-up vs £110 each

    PASS
    Expected
    [{"from": 2, "to": 0, "amountPence": 1500}, {"from": 2, "to": 1, "amountPence": 600}]
    Actual
    [{"from": 2, "to": 0, "amountPence": 1500}, {"from": 2, "to": 1, "amountPence": 600}]
  • T2dEqual split: Sam £6 over

    PASS
    Expected
    [{"person": 1, "overByPence": 600}]
    Actual
    [{"person": 1, "overByPence": 600}]