repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BINOMDIST.php
tests/data/Calculation/Statistical/BINOMDIST.php
<?php declare(strict_types=1); return [ [ 0.706399436132, 3, 8, 0.35, true, ], [ 0.2785857790625, 3, 8, 0.35, false, ], [ 0.538748204875, 50, 125, 0.4, true, ], [ 0.278585779062, 3, 8, 0.35, false, ], [ 0.205078125, 6, 10, 0.5, false, ], [ 1.36554E-17, 10, 100, 0.5, false, ], [ 0.079589237387, 50, 100, 0.5, false, ], [ 0.0008638556657, 65, 100, 0.5, false, ], [ 1.53165E-17, 10, 100, 0.5, true, ], [ 0.539794618694, 50, 100, 0.5, true, ], [ 0.999105034804, 65, 100, 0.5, true, ], [ '#VALUE!', 'NAN', 100, 0.5, true, ], [ '#VALUE!', 65, 'NAN', 0.5, true, ], [ '#VALUE!', 65, 100, 'NAN', true, ], [ '#VALUE!', 65, 100, 0.5, 'NAN', ], [ '#NUM!', -5, 100, 0.5, true, ], [ '#NUM!', 105, 100, 0.5, true, ], [ '#NUM!', 65, 100, -0.5, true, ], [ '#NUM!', 65, 100, 1.5, true, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/AVERAGEIF.php
tests/data/Calculation/Statistical/AVERAGEIF.php
<?php declare(strict_types=1); return [ [ 14000, [7000, 14000, 21000, 28000], '<23000', ], [ 150000, [100000, 200000, 300000, 400000], '<250000', ], [ '#DIV/0!', [100000, 200000, 300000, 400000], '<95000', ], [ 24500, [100000, 200000, 300000, 400000], '>250000', [7000, 14000, 21000, 28000], ], [ 8.2, [2012, 2012, 2013, 2011, 2011, 2010], 2012, [6, 10.4, 7, 12, 8, 15], ], [ 10, [2012, 2012, 2013, 2011, 2011, 2010], 2011, [6, 10.4, 7, 12, 8, 15], ], [ 7.8, [2012, 2012, 2013, 2011, 2011, 2010], '>=2012', [6, 10.4, 7, 12, 8, 15], ], [ 2011.2, [2012, 2012, 2013, 2011, 2011, 2010], '<2013', ], [ 200, [7000, 14000, 21000, 28000], '<23000', [100, 200, 300, 800], ], [ (2 + 4 + 8) / 3, [true, true, false, true, false], true, [2, 4, 6, 8, 10], ], [ (6 + 10) / 2, [true, true, false, true, false], '<>true', [2, 4, 6, 8, 10], ], [ (1 + 2 + 5 + 6) / 4, ['North', 'South', 'East', 'West', 'North', 'South', 'East', 'West'], '???th', [1, 2, 3, 4, 5, 6, 7, 8], ], [ 16733.5, ['East', 'West', 'North', 'South (New Office)', 'Midwest'], '=*West', [45678, 23789, -4789, 0, 9678], ], [ 18589, ['East', 'West', 'North', 'South (New Office)', 'Midwest'], '<>*(New Office)', [45678, 23789, -4789, 0, 9678], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BETADIST.php
tests/data/Calculation/Statistical/BETADIST.php
<?php declare(strict_types=1); return [ [ 0.4059136, 0.4, 4, 5, ], [ 0.99596045887, 3, 5, 10, 1, 4, ], [ 0.960370937542, 3, 7.5, 9, 1, 4, ], [ 0.960370937542, 3, 7.5, 9, 4, 1, ], [ 0.598190307617, 7.5, 8, 9, 5, 10, ], [ 0.685470581054, 2, 8, 10, 1, 3, ], [ 0.4059136, 0.4, 4, 5, ], [ 0.4059136, 0.4, 4, 5, null, null, ], [ '#VALUE!', 'NAN', 8, 10, 1, 3, ], [ '#VALUE!', 2, 'NAN', 10, 1, 3, ], [ '#VALUE!', 2, 8, 'NAN', 1, 3, ], [ '#VALUE!', 2, 8, 10, 'NAN', 3, ], [ '#VALUE!', 2, 8, 10, 1, 'NAN', ], 'alpha < 0' => [ '#NUM!', 2, -8, 10, 1, 3, ], 'alpha = 0' => [ '#NUM!', 2, 0, 10, 1, 3, ], 'beta < 0' => [ '#NUM!', 2, 8, -10, 1, 3, ], 'beta = 0' => [ '#NUM!', 2, 8, 0, 1, 3, ], 'value < Min' => [ '#NUM!', 0.5, 8, 10, 1, 3, ], 'value > Max' => [ '#NUM!', 3.5, 8, 10, 1, 3, ], 'Min = Max' => [ '#NUM!', 2, 8, 10, 2, 2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/FISHER.php
tests/data/Calculation/Statistical/FISHER.php
<?php declare(strict_types=1); return [ [ -1.472219489583, -0.9, ], [ -0.255412811883, -0.25, ], [ 1.098612288668, 0.8, ], [ 0.972955074528, 0.75, ], [ '#VALUE!', 'NAN', ], [ '#NUM!', -1.5, ], [ '#NUM!', 1.5, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/KURT.php
tests/data/Calculation/Statistical/KURT.php
<?php declare(strict_types=1); return [ [ -0.1517996372084, [3, 4, 5, 2, 3, 4, 5, 6, 4, 7], ], [ 0.532657874050135, [4, 5, 4, 4, 4, 4, 4, 2, 3, 5, 5, 3], ], [ '#DIV/0!', ['A', 'B', 'C', 'D', 'E'], ], [ '#DIV/0!', [1, 2, 3, 'A', 'B', 'C', 'D', 'E'], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/STDEVPA.php
tests/data/Calculation/Statistical/STDEVPA.php
<?php declare(strict_types=1); return [ [ 26.0545581424825, [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299], ], [ '#DIV/0!', [], ], [ 0.5, [true, false], ], [ 0.471404520791, [true, false, 1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/BasicCOUNT.php
tests/data/Calculation/Statistical/BasicCOUNT.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Shared\Date; return [ [ 5, [-1, 0, 1, 2, 3], ], [ 7, [ Date::stringToExcel('1900-02-01'), 0, null, 1.2, '', 2.4, '', 3.6, '', 4.8, 'Not a numeric', 6, ], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MIN.php
tests/data/Calculation/Statistical/MIN.php
<?php declare(strict_types=1); return [ [ 2, 10, 7, 2, 9, 27, ], [ -9, 10, 7, -9, '-27', 2, ], [ 0, null, 'STRING', true, '', '27', ], 'error among arguments' => [ '#DIV/0!', 1, 3, '=5/0', -2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/VARP_ODS.php
tests/data/Calculation/Statistical/VARP_ODS.php
<?php declare(strict_types=1); return [ [ 678.84, [1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303, 1299], ], [ 0.25, [true, false], ], [ 0.222222222222, [true, false, 1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NORMINV.php
tests/data/Calculation/Statistical/NORMINV.php
<?php declare(strict_types=1); return [ [42.000002008416, 0.908789, 40, 1.5], [5.50669420572, 0.6, 5, 2], [63.813775624441, 0.25, 65.5, 2.5], [7.074774056039, 0.015, 12.5, 2.5], [17.925225943961, 0.985, 12.5, 2.5], ['#NUM!', -0.5, 2.2, 3.3], ['#NUM!', 1.5, 2.2, 3.3], ['#NUM!', 0.5, 2.2, -3.3], ['#VALUE!', 'NaN', 2.5, 0.2], ['#VALUE!', 0.25, 'NaN', 0.2], ['#VALUE!', 0.25, 2.5, 'NaN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NORMSDIST.php
tests/data/Calculation/Statistical/NORMSDIST.php
<?php declare(strict_types=1); return [ [0.908788780274, 1.333333333333], [0.788144601416, 0.8], [0.841344746068, 1.0], [0.158655253931, -1.0], [0.066807201269, -1.5], [0.5, 0], [0.989275889978, 2.3], ['#VALUE!', 'NaN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CHIINVLeftTail.php
tests/data/Calculation/Statistical/CHIINVLeftTail.php
<?php declare(strict_types=1); return [ [ 4.671330448981, 0.3, 7, ], [ 12.548861396889, 0.75, 10, ], [ 3.283020286760, 0.93, 1, ], [ 1.832581463748, 0.6, 2, ], [ 0.454936423120, 0.5, 1, ], [ 4.351460191096, 0.5, 5, ], [ 1.323303696932, 0.75, 1, ], [ 0.210721031316, 0.1, 2, ], [ 3.218875824869, 0.8, 2, ], [ 1.212532903046, 0.25, 3, ], [ '#VALUE!', 'NaN', 3, ], [ '#VALUE!', 0.25, 'NaN', ], 'Probability < 0' => [ '#NUM!', -0.1, 3, ], 'Probability > 1' => [ '#NUM!', 1.1, 3, ], 'Freedom > 1' => [ '#NUM!', 0.1, 0.5, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/CORREL.php
tests/data/Calculation/Statistical/CORREL.php
<?php declare(strict_types=1); return [ [ 0.997054485502, [3, 2, 4, 5, 6], [9, 7, 12, 15, 17], ], [ 0.870035103816, [2, 10, 7, 17, 14, 16, 8, 12, 11, 15, 18, 3, 4, 1, 6, 5, 13, 19, 20, 9], [22.9, 45.78, 33.49, 49.77, 40.94, 36.18, 21.05, 50.57, 31.32, 53.76, 55.66, 27.61, 11.15, 10.11, 37.9, 31.08, 45.48, 63.83, 63.6, 27.01], ], [ '#VALUE!', 3, 9, ], [ '#N/A', [], [], ], [ '#DIV/0!', [3], [9], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/AVEDEV.php
tests/data/Calculation/Statistical/AVEDEV.php
<?php declare(strict_types=1); return [ [ 1.020408163265, [4, 5, 6, 7, 5, 4, 3], ], [ 1.65, [10.5, 7.2], ], [ 17.2, [7.2, 5.4, 45], ], [ 61.504, [10.5, 7.2, 200, 5.4, 8.1], ], [ [1.825, '#VALUE!'], [ // The index simulates a cell value // Numbers and Booleans are both counted '0.1.A' => 1, '0.2.A' => '2', '0.3.A' => 3.4, '0.4.A' => true, '0.5.A' => 5, '0.6.A' => null, '0.7.A' => 6.7, '0.8.A' => 'STRING', '0.9.A' => '', ], ], 'numeric string' => [ [1.825, 1.85], [1, '2', 3.4, true, 5, 6.7], ], 'non-numeric string' => [ // When non-numeric strings are passed directly, then a #VALUE! error is raised [1.825, '#VALUE!'], [1, '2', 3.4, true, 5, null, 6.7, 'STRING', ''], ], 'no arguments' => [ ['#NUM!', 'exception'], [], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NEGBINOMDIST.php
tests/data/Calculation/Statistical/NEGBINOMDIST.php
<?php declare(strict_types=1); return [ [ 0.05504866037517786, 10, 5, 0.25, ], [ 0.047210693359375, 6, 12, 0.5, ], [ 0.0805901288986206, 12, 12, 0.5, ], [ 0.057564377784729004, 15, 12, 0.5, ], [ '#VALUE!', 'NaN', 12, 0.5, ], [ '#VALUE!', 15, 'NaN', 0.5, ], [ '#VALUE!', 15, 12, 'NaN', ], [ '#NUM!', 15, 12, -0.25, ], [ '#NUM!', -1, 1, 0.25, ], [ '#NUM!', 1, 0.5, 0.25, ], [ '#NUM!', 6, 12, -0.25, ], [ '#NUM!', 1, 12, 1.25, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/AVERAGEA.php
tests/data/Calculation/Statistical/AVERAGEA.php
<?php declare(strict_types=1); return [ [ 7.0, [10, 7, 9, 2], ], [ [5.6, '#VALUE!'], [10, 7, 9, 2, 'STRING VALUE'], ], [ 8.85, [10.5, 7.2], ], [ 43.74, [10.5, 7.2, 200, true, false], ], [ 0.5, [true, false], ], [ 0.666666666667, [true, false, 1], ], 'no arguments' => [ ['#DIV/0!', 'exception'], [], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GAMMAINV.php
tests/data/Calculation/Statistical/GAMMAINV.php
<?php declare(strict_types=1); return [ [ 10.0000111914377, 0.068094, 9, 2, ], [ 5.348120627447, 0.5, 3, 2, ], [ '#VALUE!', 'NaN', 3, 2, ], [ '#VALUE!', 0.5, 'NaN', 2, ], [ '#VALUE!', 0.5, 3, 'NaN', ], 'Probability < 0' => [ '#NUM!', -0.5, 3, 2, ], 'Probability > 1' => [ '#NUM!', 1.5, 3, 2, ], 'Alpha < 0' => [ '#NUM!', 0.5, -3, 2, ], 'Alpha = 0' => [ '#NUM!', 0.5, 0, 2, ], 'Beta < 0' => [ '#NUM!', 0.5, 3, -2, ], 'Beta = 0' => [ '#NUM!', 0.5, 3, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/COUNTIFS.php
tests/data/Calculation/Statistical/COUNTIFS.php
<?php declare(strict_types=1); return [ 'no argument' => [ 'exception', ], [ 2, ['Y', 'Y', 'N'], '=Y', ], [ 3, ['A', 'B', 'C', 'B', 'B'], '=B', ], [ 3, ['C', 'B', 'A', 'B', 'B'], '=B', ], // TODO I believe that PhpSpreadsheet counts false and shouldn't. // [ // 2, // [1, 2, 3, 'B', null, '', false], // '<=2', // ], // [ // 2, // [1, 2, 3, 'B', null, '', false], // '<=B', // ], [ 4, ['Female', 'Female', 'Female', 'Male', 'Male', 'Male', 'Female', 'Female', 'Female', 'Male', 'Male', 'Male'], 'Female', [0.63, 0.78, 0.39, 0.55, 0.71, 0.51, 0.78, 0.81, 0.49, 0.35, 0.69, 0.65], '>60%', ], [ 2, ['Maths', 'English', 'Science', 'Maths', 'English', 'Science', 'Maths', 'English', 'Science', 'Maths', 'English', 'Science'], 'Science', [0.63, 0.78, 0.39, 0.55, 0.71, 0.51, 0.78, 0.81, 0.49, 0.35, 0.69, 0.65], '<50%', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/QUARTILE.php
tests/data/Calculation/Statistical/QUARTILE.php
<?php declare(strict_types=1); return [ [ 3.5, [1, 2, 4, 7, 8, 9, 10, 12], 1, ], [ 5.4, [10.5, 7.2, 200, 5.4, 8.1], 0, ], [ 7.2, [10.5, 7.2, 200, 5.4, 8.1], 1, ], [ 8.1, [10.5, 7.2, 200, 5.4, 8.1], 2, ], [ 10.5, [10.5, 7.2, 200, 5.4, 8.1], 3, ], [ 200, [10.5, 7.2, 200, 5.4, 8.1], 4, ], [ 7.75, [7, 8, 9, 10], 1, ], [ 8.5, [7, 8, 9, 10], 2, ], [ 9.25, [7, 8, 9, 10], 3, ], [ '#NUM!', [7, 8, 9, 10], -1, ], [ '#NUM!', [7, 8, 9, 10], 5, ], [ '#VALUE!', [7, 8, 9, 10], 'X', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/OpenOfficeCOUNT.php
tests/data/Calculation/Statistical/OpenOfficeCOUNT.php
<?php declare(strict_types=1); return [ 'passing range count bool but not null nor text numbers' => [ 5, [ // The index simulates a cell value // Numbers and Booleans are both counted '0.1.A' => 'A', '0.2.A' => 1, '0.3.A' => true, '0.4.A' => 2.9, '0.5.A' => false, '0.6.A' => '3', '0.7.A' => '', '0.8.A' => null, '0.9.A' => 9, ], ], 'passing values directly counts bool, null, and text numbers' => [ 7, // No index indicates arguments passed as literals rather than cell values // In this case, booleans are counted as well as numbers, as are numeric-value string literals 'A', 1, true, 2.9, false, '3', '', null, 9, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/LOGNORMDIST.php
tests/data/Calculation/Statistical/LOGNORMDIST.php
<?php declare(strict_types=1); return [ [0.0390835557068, 4, 3.5, 1.2], [0.066417114799, 12, 10, 5], ['#NUM!', -1.1, 2.2, 3.3], ['#NUM!', 1.1, 2.2, -3.3], ['#VALUE!', 'NaN', 0.1, 0.2], ['#VALUE!', 1.1, 'NAN', 0.2], ['#VALUE!', 1.1, 0.1, 'NAN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/PERCENTILE.php
tests/data/Calculation/Statistical/PERCENTILE.php
<?php declare(strict_types=1); return [ [ 1.9, [1, 2, 3, 4], 0.3, ], [ 3.4, [1, 2, 3, 4], 0.8, ], [ 3.25, [1, 2, 3, 4], 0.75, ], [ 8.05, [7, 8, 9, 20], 0.35, ], [ 8.1, [10.5, 7.2, 200, 5.4, 8.1], 0.5, ], [ 48.4, [10.5, 7.2, 200, 5.4, 8.1], 0.8, ], [ 2, [2, 1, 6, 4, 3, 5], 0.2, ], [ 4, [2, 1, 6, 4, 3, 5], 0.6, ], [ 3.5, [2, 1, 6, 4, 3, 5], 0.5, ], [ 5.75, [2, 1, 6, 4, 3, 5], 0.95, ], [ '#NUM!', [1, 2, 3, 4], -0.3, ], [ '#NUM!', [1, 2, 3, 4], 1.5, ], [ '#NUM!', ['A', 'B'], 0.5, ], [ '#VALUE!', [1, 2, 3, 4], 'NaN', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NORMDIST.php
tests/data/Calculation/Statistical/NORMDIST.php
<?php declare(strict_types=1); return [ [0.9087887802741, 42, 40, 1.5, true], [0.109340049784, 42, 40, 1.5, false], [0.0176032663382, 50, 40, 20, false], [0.2524925375469, 0.8, 1, 0.3, true], [0.8413447460685, 68, 65.5, 2.5, true], ['#NUM!', 42, 40, -1.5, true], ['#VALUE!', 'NaN', 40, 1.5, true], ['#VALUE!', 42, 'NaN', 1.5, true], ['#VALUE!', 42, 40, 'NaN', true], ['#VALUE!', 42, 40, 1.5, 'NaN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NORMSINV.php
tests/data/Calculation/Statistical/NORMSINV.php
<?php declare(strict_types=1); return [ [1.33333467227723, 0.908789], [-0.67448975022342, 0.25], [0.12566134687610, 0.55], [1.28155156414015, 0.9], ['#VALUE!', 'NaN'], ['#NUM!', -0.9], ['#NUM!', 1.9], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/NORMSDIST2.php
tests/data/Calculation/Statistical/NORMSDIST2.php
<?php declare(strict_types=1); return [ [0.908788780274, 1.333333333333, true], [0.164010074676, 1.333333333333, false], [0.352065326764, 0.5, false], [0.788144601416, 0.8, true], [0.841344746068, 1.0, true], [0.158655253931, -1.0, true], [0.066807201269, -1.5, true], [0.129517595666, -1.5, false], [0.5, 0, true], [0.398942280401, 0, false], [0.989275889978, 2.3, true], [0.028327037742, 2.3, false], ['#VALUE!', 'NaN', true], ['#VALUE!', 2.3, 'NaN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/DEVSQ.php
tests/data/Calculation/Statistical/DEVSQ.php
<?php declare(strict_types=1); return [ [ 48, [4, 5, 8, 7, 11, 4, 3], ], [ 47.5, [1, 3, 5, 2, 9, 7], ], [ 79.875, [1, 3, 5, 2, 9, 7, 8, 10], ], [ '#NUM!', ['A', 'B', 'C', 'D'], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GAUSS.php
tests/data/Calculation/Statistical/GAUSS.php
<?php declare(strict_types=1); return [ [0.4772498680518, 2], [-0.4999997133484, -5], [0.0, 0], [0.0398278372770, 0.1], [0.4937903346742, 2.5], ['#VALUE!', 'NAN'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/ExcelCOUNT.php
tests/data/Calculation/Statistical/ExcelCOUNT.php
<?php declare(strict_types=1); return [ 'passing range do not count bool, null, or text numbers' => [ 3, [ // The index simulates a cell value '0.1.A' => 'A', '0.2.A' => 1, '0.3.A' => true, '0.4.A' => 2.9, '0.5.A' => false, '0.6.A' => '3', '0.7.A' => '', '0.8.A' => null, '0.9.A' => 9, ], ], 'passing values - count null, boolean and text numbers' => [ 7, // No index indicates arguments passed as literals rather than cell values // In this case, booleans are counted as well as numbers, as are numeric-value string literals 'A', 1, true, 2.9, false, '3', '', null, 9, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/PERMUTATIONA.php
tests/data/Calculation/Statistical/PERMUTATIONA.php
<?php declare(strict_types=1); return [ [ 5, 5, 1, ], [ 2, 2.2, 1.1, ], [ 5, 5.1, 1.9, ], [ 1, 1, 2, ], [ '#NUM!', -1, 2, ], [ '#NUM!', 1, -2, ], [ '#VALUE!', 'NaN', 31, ], [ '#VALUE!', 49, 'NaN', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/MODE.php
tests/data/Calculation/Statistical/MODE.php
<?php declare(strict_types=1); return [ [4.1, '{5.6,4.1,4.1,3,2,4.1}'], // Calculated value was #N/A [4.1, '5.6,4.1,4.1,3,2,4.1'], [3, '3,3,4,4'], [4, '4,3,3,4'], // Calculated value was 3 ['#N/A', '1,2,3,4'], [2, '1,2,2,"3","3","3"'], ['#N/A', '"3","3","3"'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/TDIST2T.php
tests/data/Calculation/Statistical/TDIST2T.php
<?php declare(strict_types=1); return [ [ 0.054644929976, 1.959999998, 60, ], [ 0.340893132302, 1, 10, ], [ 0.056475980427, 2, 25, ], 'test 2 derived from Perl suite 2-tail' => [ 0.0082602, 6.251, 3, ], 'issue 4167' => [ 0.31730337488351257, 1.8373862310371, 1, ], [ '#VALUE!', 'NaN', 10, ], [ '#VALUE!', 1, 'NaN', ], [ '#NUM!', -1, 10, ], [ '#NUM!', 1, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/SLOPE.php
tests/data/Calculation/Statistical/SLOPE.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Shared\Date; return [ [ 0.6, [3, 6, 9, 12], [5, 10, 15, 20], ], [ 1.0, [1, 2, 3, 4], [10, 11, 12, 13], ], [ 0.2, [2, 4, 6], [10, 20, 30], ], [ 4.628571428571, [3, 7, 17, 20, 20, 27], [1, 2, 3, 4, 5, 6], ], [ 9.472222222222, [ Date::stringToExcel('1900-02-01'), Date::stringToExcel('1900-03-01'), Date::stringToExcel('1900-09-01'), Date::stringToExcel('1900-01-01'), Date::stringToExcel('1900-08-01'), Date::stringToExcel('1900-07-01'), Date::stringToExcel('1900-05-01'), ], [ 6, 5, 11, 7, 5, 4, 4, ], ], [ 0.305555555556, [ Date::stringToExcel('1900-01-02'), Date::stringToExcel('1900-01-03'), Date::stringToExcel('1900-01-09'), Date::stringToExcel('1900-01-01'), Date::stringToExcel('1900-01-08'), Date::stringToExcel('1900-01-07'), Date::stringToExcel('1900-01-05'), ], [ 6, 5, 11, 7, 5, 4, 4, ], ], [ '#N/A', [1, 2, 3], [4, 5], ], [ '#DIV/0!', [1, 2, 3], [4, null, null], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/GAMMADIST.php
tests/data/Calculation/Statistical/GAMMADIST.php
<?php declare(strict_types=1); return [ [ 0.03263913041829, 10.00001131, 9, 2, false, ], [ 0.06809400387, 10.00001131, 9, 2, true, ], [ 0.112020903828, 6, 3, 2, false, ], [ 0.576809918873, 6, 3, 2, true, ], 'Boolean as numeric' => [ 0.576809918873, 6, 3, 2, 1, ], [ '#VALUE!', 'NAN', 3, 2, true, ], [ '#VALUE!', 6, 'NAN', 2, true, ], [ '#VALUE!', 6, 3, 'NAN', true, ], [ '#VALUE!', 6, 3, 2, 'NAN', ], 'Value < 0' => [ '#NUM!', -6, 3, 2, true, ], 'A < 0' => [ '#NUM!', 6, -3, 2, true, ], 'A = 0' => [ '#NUM!', 6, 0, 2, true, ], 'B < 0' => [ '#NUM!', 6, 3, -2, true, ], 'B = 0' => [ '#NUM!', 6, 3, 0, true, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Statistical/COUNTBLANK.php
tests/data/Calculation/Statistical/COUNTBLANK.php
<?php declare(strict_types=1); return [ [ 4, [-1, null, 0, '', 1, null, 2, '', 3], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/XORLiteral.php
tests/data/Calculation/Logical/XORLiteral.php
<?php declare(strict_types=1); return [ 'both boolean true' => [false, 'true, true'], 'boolean xor string-true' => [false, 'true, "true"'], 'true xor non-boolean-string' => [true, 'true, "xyz"'], 'non-boolean-string xor true' => [true, '"xyz", true'], 'empty-string xor true' => [true, '"", true'], 'non-boolean-string xor false' => [false, 'false, "xyz"'], 'false xor non-boolean-string' => [false, '"xyz", false'], 'only non-boolean-string' => ['#VALUE!', '"xyz"'], 'only boolean-string' => [true, '"true"'], 'numeric-true xor true xor true' => [true, '3.1, true, true'], 'numeric-false xor true xor true' => [false, '0, true, true'], 'mixed boolean' => [true, 'true, true, true, false'], 'only true' => [true, 'true'], 'only false' => [false, 0.0], 'boolean in array' => [true, '{true}'], 'boolean-string in array' => ['#VALUE!', '{"true"}'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/XOR.php
tests/data/Calculation/Logical/XOR.php
<?php declare(strict_types=1); return [ 'no arguments' => [ 'exception', ], 'only argument is null reference' => [ '#VALUE!', null, ], [ false, true, true, ], [ true, true, false, false, ], [ true, true, false, ], [ true, false, true, ], [ false, false, false, ], [ false, true, true, false, false, ], [ true, true, true, true, false, ], 'ignore string other two should be true' => [ false, 'TRUE', 1, 0.5, ], [ true, 'FALSE', 1.5, 0, ], 'only arg is string' => [ '#VALUE!', 'HELLO WORLD', ], 'true string is ignored' => [ true, 'TRUE', 1, ], 'false string is ignored' => [ true, 'FALSE', true, ], 'string 1 is ignored' => [ true, '1', true, ], 'non-boolean string is ignored' => [ true, 'ABCD', 1, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/IF.php
tests/data/Calculation/Logical/IF.php
<?php declare(strict_types=1); return [ 'no arguments' => [ 'exception', ], '1 argument true' => [ 'exception', true, ], '1 argument false' => [ 'exception', false, ], 'value_if_false omitted condtion is true' => [ 'ABC', true, 'ABC', ], 'value_if_false omitted condition is false' => [ false, false, 'ABC', ], 'value_if_true omitted condition is true' => [0, true, null, 'error'], 'value_if_true omitted condition is false' => ['error', false, null, 'error'], [ 'ABC', true, 'ABC', 'XYZ', ], [ 'XYZ', false, 'ABC', 'XYZ', ], [ '#N/A', '#N/A', 'ABC', 'XYZ', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/AND.php
tests/data/Calculation/Logical/AND.php
<?php declare(strict_types=1); return [ 'no arguments' => [ 'exception', ], 'only argument is null reference' => [ '#VALUE!', null, ], // Boolean TRUE and NULL [ true, true, null, ], // Boolean FALSE and NULL [ false, false, null, ], // Both TRUE Booleans [ true, true, true, ], // Mixed Booleans [ false, true, false, ], // Mixed Booleans [ false, false, true, ], // Both FALSE Booleans [ false, false, false, ], // Multiple Mixed Booleans [ false, true, true, false, ], // Multiple TRUE Booleans [ true, true, true, true, ], // Multiple FALSE Booleans [ false, false, false, false, false, ], [ true, -1, -2, ], [ false, 0, 0, ], [ false, 0, 1, ], [ true, 1, 1, ], 'string 1 is ignored' => [ true, '1', 1, ], 'true string is ignored' => [ true, 'TRUE', 1, ], 'false string is ignored' => [ true, 'FALSE', true, ], 'non-boolean string is ignored' => [ false, 'ABCD', 0, ], [ true, -2, 1, ], [ false, -2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/IFERROR.php
tests/data/Calculation/Logical/IFERROR.php
<?php declare(strict_types=1); return [ 'empty cell treated as 0' => [ 0, null, 'Error', ], [ true, true, 'Error', ], [ 42, 42, 'Error', ], [ '', '', 'Error', ], [ 'ABC', 'ABC', 'Error', ], [ 'Error', '#VALUE!', 'Error', ], [ 'Error', '#NAME?', 'Error', ], [ 'Error', '#N/A', 'Error', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/SWITCH.php
tests/data/Calculation/Logical/SWITCH.php
<?php declare(strict_types=1); return [ 'match value1 A result is C' => [ 'C', 'A', 'A', 'C', 'B', 'D', '??', ], 'match value2 2 result is female' => [ 'Female', 2, '1', 'Male', '2', 'Female', ], 'defined default value' => [ 'X', 'U', 'ABC', 'Y', 'DEF', 'Z', 'X', ], 'undefined default value' => [ '#N/A', 'U', 'ABC', 'Y', 'DEF', 'Z', ], 'no arguments' => ['exception'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/OR.php
tests/data/Calculation/Logical/OR.php
<?php declare(strict_types=1); return [ 'no arguments' => [ 'exception', ], 'only argument is null reference' => [ '#VALUE!', null, ], // Boolean TRUE and NULL [ true, true, null, ], // Boolean FALSE and NULL [ false, false, null, ], // Both TRUE Booleans [ true, true, true, ], // Mixed Booleans [ true, true, false, ], // Mixed Booleans [ true, false, true, ], // Both FALSE Booleans [ false, false, false, ], // Multiple Mixed Booleans [ true, true, true, false, ], // Multiple TRUE Booleans [ true, true, true, true, ], // Multiple FALSE Booleans [ false, false, false, false, false, ], [ true, -1, -2, ], [ false, 0, 0, ], [ true, 0, 1, ], [ true, 1, 1, ], 'string 1 is ignored' => [ false, 0, '1', ], 'true string is ignored' => [ true, 'TRUE', 1, ], 'false string is ignored' => [ true, 'FALSE', true, ], 'non-boolean string is ignored' => [ true, 'ABCD', 1, ], [ true, -2, 1, ], [ true, -2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/IFNA.php
tests/data/Calculation/Logical/IFNA.php
<?php declare(strict_types=1); return [ [ 55, 55, 'not found', ], [ 'not found', '#N/A', 'not found', ], 'non-NA error' => ['#VALUE!', '#VALUE!', 'not found'], 'empty cell treated as 0' => [0, null, 'Error'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/NOT.php
tests/data/Calculation/Logical/NOT.php
<?php declare(strict_types=1); return [ 'no arguments' => [ 'exception', ], [ true, null, ], [ false, -1, ], [ true, 0, ], [ false, 1, ], [ false, 2, ], [ false, -1.5, ], [ false, 1.5, ], [ '#VALUE!', '-1', ], [ '#VALUE!', '0', ], [ '#VALUE!', '1', ], [ '#VALUE!', '2', ], [ '#VALUE!', '-1.5', ], [ '#VALUE!', '1.5', ], [ '#VALUE!', '', ], [ '#VALUE!', 'ABC', ], [ true, 'FALSE', ], [ false, 'TRUE', ], [ false, true, ], [ true, false, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/IFS.php
tests/data/Calculation/Logical/IFS.php
<?php declare(strict_types=1); return [ 'no arguments' => ['exception'], [ 1, true, 1, ], [ '#N/A', false, 1, true, ], [ 'ABC', true, 'ABC', ], [ '#N/A', false, false, false, 1, false, 'ABC', ], [ 'ABC', false, false, false, 1, true, 'ABC', ], [ false, true, false, false, 1, true, 'ABC', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/ANDLiteral.php
tests/data/Calculation/Logical/ANDLiteral.php
<?php declare(strict_types=1); return [ 'both boolean true' => [true, 'true, true'], 'boolean and string-true' => [true, 'true, "true"'], 'true and non-boolean-string' => [true, 'true, "xyz"'], 'non-boolean-string and true' => [true, '"xyz", true'], 'empty-string and true' => [true, '"", true'], 'non-boolean-string and false' => [false, 'false, "xyz"'], 'false and non-boolean-string' => [false, '"xyz", false'], 'only non-boolean-string' => ['#VALUE!', '"xyz"'], 'only boolean-string' => [true, '"true"'], 'numeric-true and true' => [true, '3.1, true, true'], 'numeric-false and true' => [false, '0, true, true'], 'mixed boolean' => [false, 'true, true, true, false'], 'only true' => [true, 'true'], 'only false' => [false, 0.0], 'boolean in array' => [true, '{true}'], 'boolean-string in array' => ['#VALUE!', '{"true"}'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Logical/ORLiteral.php
tests/data/Calculation/Logical/ORLiteral.php
<?php declare(strict_types=1); return [ 'both boolean true' => [true, 'true, true'], 'boolean or string-true' => [true, 'true, "true"'], 'true or non-boolean-string' => [true, 'true, "xyz"'], 'non-boolean-string or true' => [true, '"xyz", true'], 'empty-string or true' => [true, '"", true'], 'non-boolean-string or false' => [false, 'false, "xyz"'], 'false or non-boolean-string' => [false, '"xyz", false'], 'only non-boolean-string' => ['#VALUE!', '"xyz"'], 'only boolean-string' => [true, '"true"'], 'numeric-true or true' => [true, '3.1, true, true'], 'numeric-false or true' => [true, '0, true, true'], 'mixed boolean' => [true, 'true, true, true, false'], 'only true' => [true, 'true'], 'only false' => [false, 0.0], 'boolean in array' => [true, '{true}'], 'boolean-string in array' => ['#VALUE!', '{"true"}'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/FV.php
tests/data/Calculation/Financial/FV.php
<?php declare(strict_types=1); // rate, nper, pmt, pv, type, Result return [ [ 2581.4033740600998, [0.005, 10, -200, -500, 1], ], [ 2421.371872695160, [-0.005, 10, -200, -500, 1], ], [ 12682.503013197, [0.01, 12, -1000], ], [ 11361.512828387000, [-0.01, 12, -1000], ], [ 82859.19732763403, [0.009175, 35, -2000, null, 1], ], [ 2301.4018303408998, [0.005, 12, -100, -1000, 1], ], [ 2103.328949318290, [-0.005, 12, -100, -1000, 1], ], [ -178.046206611904, [0.005, 12, 100, -1000, 1], ], [ 178.046206611904, [0.005, 12, -100, 1000, 1], ], [ -2301.401830340900, [0.005, 12, 100, 1000, 1], ], [ -220.083335489543, [-0.005, 12, 100, -1000, 1], ], [ 220.083335489543, [-0.005, 12, -100, 1000, 1], ], [ -2103.328949318290, [-0.005, 12, 100, 1000, 1], ], [ 68023.43754198513, [0.004175, 60, -1000], ], [ 39729.460894165997, [0.025, 16, -2000, 0, 1], ], [ 1300, [0.0, 12, -100, -100], ], [ -1100, [0.0, 12, 100, -100], ], [ 1100, [0.0, 12, -100, 100], ], [ -1300, [0.0, 12, 100, 100], ], [ '#VALUE!', ['NaN', 12, -100, -100], ], [ '#VALUE!', [0.0, 'NaN', -100, -100], ], [ '#VALUE!', [0.0, 12, 'NaN', -100], ], [ '#VALUE!', [0.0, 12, -100, 'NaN'], ], [ '#VALUE!', [0.0, 12, -100, -100, 'NaN'], ], [ -33882857.54639115, [-0.10, -100, -100, 0, 1], ], [ -10000.00, [0.0, -100, -100, 0, 1], ], [ -100.0, [0.10, -1, -100, 0, 1], ], [ '#NUM!', [0.10, 12, -100, 0, 2], ], [ '#NUM!', [0.10, 12, -100, 0, -1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/USDOLLAR.php
tests/data/Calculation/Financial/USDOLLAR.php
<?php declare(strict_types=1); return [ ['$12,345.67890', 12345.6789, 5], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PRICE3.php
tests/data/Calculation/Financial/PRICE3.php
<?php declare(strict_types=1); // Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis // On the result line, the value is ODS's calculation. // This agrees with Gnumeric, PhpSpreadsheet, and the published algorithm at: //https://support.office.com/en-us/article/price-function-3ea9deac-8dfa-436f-a7c8-17ea02c21b0a. // The commented-out value on the next line is Excel's result. // I do not know how best to reconcile the different results. // The problem seems restricted to basis codes 2 and 3. return [ [ 94.60241717687768, // 94.636564030025099, '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 2, ], [ 94.643594548258, // 94.635174796784497, '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 3, ], [ 110.74436592216529, // 110.83448359321601, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 2, 2, ], [ 110.81970970927745, // 110.83452855143901, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 2, 3, ], [ 110.8912556, // 110.9216934, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, 2, ], [ 110.9292394066714, // 110.921732963198, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, 3, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/AMORDEGRC.php
tests/data/Calculation/Financial/AMORDEGRC.php
<?php declare(strict_types=1); // Cost, Date purchased, End of the 1st period, Salvage, Period, Depreciation, Basis, Result return [ [ 776, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 1, ], [ 776, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 0, ], [ 776, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, null, ], [ 820, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.2, 1, ], [ 492, 2400, '2008-08-19', '2008-12-31', 300, 2, 0.2, 1, ], [ 886, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.22, 1, ], [ 949, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.24, 1, ], [ 494, 2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 1, ], [ 902, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.3, 1, ], [ 42, 150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 4, ], [ 25, 150, '2011-01-01', '2011-09-30', 20, 2, 0.2, 4, ], [ 16, 150, '2011-01-01', '2011-09-30', 20, 3, 0.15, 4, ], [ 42, 150, '2011-01-01', '2011-09-30', 20, 1, 0.4, 4, ], [ 2813, 10000, '2012-03-01', '2012-12-31', 1500, 1, 0.3, 1, ], [ 0.0, 500, '2012-03-01', '2012-12-31', 500, 3, 0.3, 1, ], [ '#VALUE!', 'NaN', '2012-03-01', '2020-12-25', 20, 1, 0.2, 4, ], [ '#VALUE!', 550, 'notADate', '2020-12-25', 20, 1, 0.2, 4, ], [ '#VALUE!', 550, '2011-01-01', 'notADate', 20, 1, 0.2, 4, ], [ '#VALUE!', 550, '2012-03-01', '2020-12-25', 'NaN', 1, 0.2, 4, ], [ '#VALUE!', 550, '2012-03-01', '2020-12-25', 20, 'NaN', 0.2, 4, ], [ '#VALUE!', 550, '2012-03-01', '2020-12-25', 20, 1, 'NaN', 4, ], [ '#VALUE!', 550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 'NaN', ], [ '#NUM!', 550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 99, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/CUMPRINC.php
tests/data/Calculation/Financial/CUMPRINC.php
<?php declare(strict_types=1); // rate, nper, pv, start_period, end_period, type, result return [ [ -934.10712342088004, 0.0075, 360, 125000, 13, 24, 0, ], [ -68.278271180977001, 0.0075, 360, 125000, 1, 1, 0, ], [ -68.278271180977001, 0.0075, 360, 125000, 1, 1, null, ], [ -9025.875084814226, 0.004175, 60, 50000, 1, 12, 0, ], [ -9488.600856134633, 0.004175, 60, 50000, 13, 24, 0, ], [ -9975.04899646991, 0.004175, 60, 50000, 25, 36, 0, ], [ -10486.435670612591, 0.004175, 60, 50000, 37, 48, 0, ], [ -11024.039391968092, 0.004175, 60, 50000, 49, 60, 0, ], [ '#VALUE!', 'NaN', 360, 125000, 13, 24, 0, ], [ '#VALUE!', 0.0075, 'NaN', 125000, 13, 24, 0, ], [ '#VALUE!', 0.0075, 360, 'NaN', 13, 24, 0, ], [ '#VALUE!', 0.0075, 360, 125000, 'NaN', 24, 0, ], [ '#VALUE!', 0.0075, 360, 125000, 13, 'NaN', 0, ], [ '#VALUE!', 0.0075, 360, 125000, 13, 24, 'NaN', ], [ '#VALUE!', 0.0075, 360, 125000, 24, 13, 0, ], [ '#NUM!', 0.0075, 360, 125000, 24, 13, 2, ], [ '#NUM!', 0.0075, 10, 125000, 13, 24, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/TBILLEQ.php
tests/data/Calculation/Financial/TBILLEQ.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [ 0.094151494, '31-Mar-2008', '1-Jun-2008', 0.0914, ], [ ExcelError::VALUE(), 'Not a Valid Date', '1-Jun-2008', 0.09, ], [ ExcelError::VALUE(), '31-Mar-2008', 'Not a Valid Date', 0.09, ], [ ExcelError::VALUE(), '31-Mar-2008', '1-Jun-2008', 'NaN', ], [ ExcelError::NAN(), '31-Mar-2008', '1-Jun-2008', -0.09, ], [ ExcelError::NAN(), '31-Mar-2000', '1-Jun-2021', 0.09, ], [ ExcelError::NAN(), '1-Jun-2008', '31-Mar-2008', 0.09, ], [ 0.025465926, '5-Feb-2019', '1-Feb-2020', 0.0245, ], [ 0.036787997, '1-Feb-2016', '30-Jan-2017', 0.035, ], [ 0.025612238, '1-Feb-2017', '30-Jun-2017', 0.025, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/TBILLPRICE.php
tests/data/Calculation/Financial/TBILLPRICE.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [ 98.45, '31-Mar-2008', '1-Jun-2008', 0.09, ], [ ExcelError::VALUE(), 'Not a Valid Date', '1-Jun-2008', 0.09, ], [ ExcelError::VALUE(), '31-Mar-2008', 'Not a Valid Date', 0.09, ], [ ExcelError::VALUE(), '31-Mar-2008', '1-Jun-2008', 'NaN', ], [ ExcelError::NAN(), '31-Mar-2008', '1-Jun-2008', -0.09, ], [ ExcelError::NAN(), '31-Mar-2000', '1-Jun-2021', 0.09, ], [ ExcelError::NAN(), '1-Jun-2008', '31-Mar-2008', 0.09, ], [ 0.0, '31-Mar-2008', '1-Apr-2008', 360, ], [ ExcelError::NAN(), '31-Mar-2008', '1-Apr-2008', 361, ], [ 97.75, '1-Apr-2017', '30-Jun-2017', 0.09, ], [ 97.543194444, '5-Feb-2019', '1-Feb-2020', 0.0245, ], [ 98.86180556, '1-Feb-2017', '30-Jun-2017', 0.0275, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/SYD.php
tests/data/Calculation/Financial/SYD.php
<?php declare(strict_types=1); return [ [ 3000, [10000, 1000, 5, 1], ], [ 2400, [10000, 1000, 5, 2], ], [ 1800, [10000, 1000, 5, 3], ], [ 1200, [10000, 1000, 5, 4], ], [ 600, [10000, 1000, 5, 5], ], [ 1428.5714285714287, [8000, 0, 7, 3], ], [ 4090.909090909091, [30000, 7500, 10, 1], ], [ 409.09090909090907, [30000, 7500, 10, 10], ], [ -800, [-2000, 1000, 5, 2], ], [ 3771.4285714285716, [12000, 1000, 2.5, 2], ], [ 5028.571428571428, [12000, 1000, 2.5, 1.5], ], [ -600, [-2000, 1000, 5, 3], ], [ -800, [12000, 15000, 5, 2], ], [ '#NUM!', [12000, -1000, 5, 3], ], [ '#NUM!', [10000, 1000, 5, 10], ], [ '#VALUE!', ['INVALID', 1000, 5, 1], ], [ '#VALUE!', [12000, 'INVALID', 5, 1], ], [ '#VALUE!', [12000, 1000, 'INVALID', 1], ], [ '#VALUE!', [12000, 1000, 5, 'INVALID'], ], [ '#NUM!', [12000, -1, 5, 2], ], [ '#NUM!', [12000, 1000, -5, 1], ], [ '#NUM!', [12000, 1000, 5, 0], ], [ '#NUM!', [12000, 1000, 5, -1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DOLLARFR.php
tests/data/Calculation/Financial/DOLLARFR.php
<?php declare(strict_types=1); // decimal_dollar, fraction, result return [ [ 1.24, 1.6, 4, ], [ -1.24, -1.6, 4, ], [ 1.02, 1.125, 16, ], [ 1.04, 1.125, 32, ], [ 1.01, 1.0625, 16, ], [ 1.1000000000000001, 1.625, 16, ], [ 1.03, 1.09375, 32, ], [ 1.3, 1.9375, 32, ], [ 1.1200000000000001, 1.375, 32, ], [ '#VALUE!', 'Not A Number', 0, ], [ '#DIV/0!', 1.2344999999999999, 0, ], [ '#NUM!', 1.2344999999999999, -2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PRICE.php
tests/data/Calculation/Financial/PRICE.php
<?php declare(strict_types=1); // Result, Settlement, Maturity, Rate, Yield, Redemption, Frequency, Basis return [ [ '#VALUE!', 'xyz', '15-Nov-2017', 0.0575, 0.065, 100, 2, 0, ], [ '#VALUE!', '15-Feb-2008', 'xyz', 0.0575, 0.065, 100, 2, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 'xyz', 0.065, 100, 2, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 0.0575, 'xyz', 100, 2, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 'xyz', 2, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 'xyz', 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 'xyz', ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, -1, // invalid basis ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 5, // invalid basis ], [ '#NUM!', '15-Nov-2017', // maturity before settlement '15-Feb-2008', 0.0575, 0.065, 100, 2, 0, ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 5, // invalid frequency 0, ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 6, // had been coded as valid for gnumeric, but it isn't 0, ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 12, // had been coded as valid for gnumeric, but it isn't 0, ], [ 94.6343616213221, '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 0, ], [ 94.635449207877201, '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 2, 1, ], [ 94.67215001, '15-Feb-2008', '15-Nov-2017', 0.0575, 0.065, 100, 1, 0, ], [ 110.83448359321601, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 2, ], [ 110.834537395859, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 2, 1, ], [ 110.9216934, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, 0, ], [ 110.9216934, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, null, ], [ 110.9217251, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, 1, ], [ 110.9216934, '01-Apr-2012', '31-Mar-2020', 0.12, 0.10, 100, 4, 4, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/IRR.php
tests/data/Calculation/Financial/IRR.php
<?php declare(strict_types=1); // values, guess, Result return [ [ -0.02124484827341, [ -70000, 12000, 15000, 18000, 21000, ], ], [ 0.086630948036519995, [ -70000, 12000, 15000, 18000, 21000, 26000, ], ], [ -0.1821374641455, [ -70000, 12000, 15000, 18000, ], 0.10, ], [ -0.13618951095869, [ -100, [ 20, 24, 28.8, ], ], ], [ 0.13057575637152699, [ -100, [ 20, 24, 28.8, 34.56, 41.47, ], ], ], [ '#VALUE!', 999, 1.23, ], [ '#VALUE!', [ 70000, 12000, 15000, 18000, 21000, ], ], [ '#VALUE!', [ -70000, -12000, -15000, -18000, -21000, ], ], 'no arguments' => ['exception'], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/NOMINAL.php
tests/data/Calculation/Financial/NOMINAL.php
<?php declare(strict_types=1); // effect_rate, npery, result use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [ 0.052500319868356002, 0.053543, 4, ], [ 0.096454756337780001, 0.10000000000000001, 4, ], [ 0.097617696340302998, 0.10000000000000001, 2, ], [ 0.024718035238113001, 0.025000000000000001, 12, ], [ ExcelError::NAN(), -0.025, 12, ], [ ExcelError::NAN(), 0.025, -12, ], [ ExcelError::VALUE(), 'NaN', 12, ], [ ExcelError::VALUE(), 0.025, 'NaN', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/NPER.php
tests/data/Calculation/Financial/NPER.php
<?php declare(strict_types=1); // rate, pmt, pv, fv, type, result return [ [ 59.673865674295001, [0.01, -100, -1000, 10000, 1], ], [ 60.082122853762002, [0.01, -100, -1000, 10000], ], [ -9.5785940398132006, [0.01, -100, -1000], ], [ 54.787577259999999, [0.003333333333, -1000, 50000], ], [ 11.90373729, [0.015, -1200, 9000, 5000, 1], ], [ 11.493114445230, [-0.015, -1200, 9000, 5000, 1], ], [ -11.328655672030, [0.015, 1200, 9000, 5000, 1], ], [ -3.046573306812, [0.015, -1200, -9000, 5000, 1], ], [ 3.621654926975, [0.015, -1200, 9000, -5000, 1], ], [ 11.666666667, [0.0, -1200, 9000, 5000, 1], ], [ '#VALUE!', ['NaN', -1200, 9000, 5000, 1], ], [ '#VALUE!', [0.015, 'NaN', 9000, 5000, 1], ], [ '#VALUE!', [0.015, -1200, 'NaN', 5000, 1], ], [ '#VALUE!', [0.015, -1200, 9000, 'NaN', 1], ], [ '#VALUE!', [0.015, -1200, 9000, 5000, 'NaN'], ], [ '#NUM!', [0.015, -1200, 9000, 5000, 2], ], [ '#NUM!', [0.015, 0.0, 0.0, 5000, 1], ], [ '#NUM!', [0.0, 0.0, -500, 5000, 1], ], [ '#NUM!', [0.25, 0.5, 0.0, 150, 1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DOLLARDE.php
tests/data/Calculation/Financial/DOLLARDE.php
<?php declare(strict_types=1); // fractional_dollar, fraction, result return [ [ 2.5, 1.6, 4, ], [ -2.5, -1.6, 4, ], [ 1.125, 1.02, 16, ], [ 1.3125, 1.1000000000000001, 32, ], [ 1.0625, 1.01, 16, ], [ 1.625, 1.1000000000000001, 16, ], [ 1.09375, 1.03, 32, ], [ 1.9375, 1.3, 32, ], [ 1.375, 1.1200000000000001, 32, ], [ '#VALUE!', 'Not A Number', 0, ], [ '#DIV/0!', 1.2344999999999999, 0, ], [ '#NUM!', 1.2344999999999999, -2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DB.php
tests/data/Calculation/Financial/DB.php
<?php declare(strict_types=1); // cost, salvage, life, period, month, result return [ [ 186083.33333333, 1000000, 100000, 6, 1, 7, ], [ 259639.41666667, 1000000, 100000, 6, 2, 7, ], [ 176814.44274999999, 1000000, 100000, 6, 3, 7, ], [ 120410.63551275, 1000000, 100000, 6, 4, 7, ], [ 81999.642784183001, 1000000, 100000, 6, 5, 7, ], [ 55841.756736028001, 1000000, 100000, 6, 6, 7, ], [ 15845.098473848, 1000000, 100000, 6, 7, 7, ], [ 1845.0, 10000, 1000, 5, 1, 6, ], [ 3009.1950000000002, 10000, 1000, 5, 2, 6, ], [ 1898.8020449999999, 10000, 1000, 5, 3, 6, ], [ 1198.1440903949999, 10000, 1000, 5, 4, 6, ], [ 756.02892103925001, 10000, 1000, 5, 5, 6, ], [ 238.52712458788, 10000, 1000, 5, 6, 6, ], [ 0.0, 0, 0, 5, 6, 6, ], [ 4651.199, 12000, 2000, 3.5, 2, 1, ], [ 3521.399, 12000, 2000, 5, 2.5, 1, ], [ 3521.399, 12000, 2000, 5, 2.5, 1.2, ], // Period value between 0 and 1 not yet handled in code // [ // 301.0, // 12000, // 2000, // 5, // 0.5, // 1, // ], [ -554.116, 12000, 15000, 5, 2, 1, ], [ '#NUM!', -1000, 100, 5, 6, 6, ], [ '#VALUE!', 'Invalid', 1000, 5, 2, 1, ], [ '#VALUE!', 12000, 'Invalid', 5, 2, 1, ], [ '#VALUE!', 12000, 1000, 'Invalid', 2, 1, ], [ '#VALUE!', 12000, 1000, 5, 'Invalid', 1, ], [ '#VALUE!', 12000, 1000, 5, 2, 'Invalid', ], [ '#NUM!', -12000, 1000, 5, 2, 1, ], [ '#NUM!', 12000, -1000, 5, 2, 1, ], [ '#NUM!', 12000, 1000, 5, 0, 1, ], [ '#NUM!', 12000, 1000, 5, -2, 1, ], [ '#NUM!', 12000, 1000, 5, 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PV.php
tests/data/Calculation/Financial/PV.php
<?php declare(strict_types=1); return [ [ -52990.70632392715, [0.05 / 12, 60, 1000], ], [ -68327.092460502600, [-0.05 / 12, 60, 1000], ], [ -26762.755452881098, [0.10 / 4, 16, 2000, 0, 1], ], [ -38955.527352284700, [-0.10 / 4, 16, 2000, 0, 1], ], [ 26762.755452881100, [0.10 / 4, 16, -2000, 0, 1], ], [ -34846.254654898500, [0.10 / 4, 16, 2000, 12000, 1], ], [ 18679.256250863700, [0.10 / 4, 16, -2000, 12000, 1], ], [ -18679.256250863700, [0.10 / 4, 16, 2000, -12000, 1], ], [ 34846.254654898500, [0.10 / 4, 16, -2000, -12000, 1], ], [ 56948.685406482400, [-0.10 / 4, 16, -2000, -12000, 1], ], [ -5555.6058459337655, [0.075 / 12, 2 * 12, 250, null, 0], ], [ -9252.072719337915, [0.06 / 52, 4 * 52, 50, null, 1], ], [ -762.8840472202697, [0.0525 / 1, 10 * 1, 100, null, 0], ], [ -1000.0, [0.0, 10 * 1, 100, null, 0], ], [ '#VALUE!', ['NaN', 10 * 1, 100, null, 0], ], [ '#VALUE!', [0.0525 / 1, 'NaN', 100, null, 0], ], [ '#VALUE!', [0.0525 / 1, 10 * 1, 'NaN', null, 0], ], [ '#VALUE!', [0.0525 / 1, 10 * 1, 100, 'NaN', 0], ], [ '#VALUE!', [0.0525 / 1, 10 * 1, 100, null, 'NaN'], ], [ '#NUM!', [0.0525 / 1, 10 * 1, 100, null, -1], ], [ '#NUM!', [0.0525 / 1, 10 * 1, 100, null, 2.5], ], [ '#NUM!', [0.0525 / 1, 10 * -1, 100, null, 1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/YIELDMAT.php
tests/data/Calculation/Financial/YIELDMAT.php
<?php declare(strict_types=1); return [ [ 0.06095433369153867, '15-Mar-2008', '3-Nov-2008', '8-Nov-2007', 0.0625, 100.0123, 0, ], [ 0.06095433369153867, '15-Mar-2008', '3-Nov-2008', '8-Nov-2007', 0.0625, 100.0123, null, ], [ 0.04210977320221025, '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, 101, ], [ '#VALUE!', 'Invalid', '30-Jun-2018', '01-Jul-2014', 0.055, 101, ], [ '#VALUE!', '1-Jan-2017', 'Invalid', '01-Jul-2014', 0.055, 101, ], [ '#VALUE!', '1-Jan-2017', '30-Jun-2018', 'Invalid', 0.055, 101, ], [ '#VALUE!', '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 'NaN', 101, ], [ '#VALUE!', '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, 'NaN', ], [ '#NUM!', '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', -0.055, 101, ], [ '#NUM!', '1-Jan-2017', '30-Jun-2018', '01-Jul-2014', 0.055, -101, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/XIRR.php
tests/data/Calculation/Financial/XIRR.php
<?php declare(strict_types=1); // result, message, values, dates, guess return [ 'If values and dates contain a different number of values, returns the #NUM! error value' => [ '#NUM!', [4000, -46000], ['2015-01-04'], 0.1, ], 'Cash flows are all negative' => [ '#NUM!', [-4000, -46000], ['2015-01-04', '2019-06-27'], 0.1, ], 'Cash flows are all positive' => [ '#NUM!', [4000, 46000], ['2015-01-04', '2019-06-27'], 0.1, ], 'If any number in dates is not a valid date, returns the #VALUE! error value' => [ '#VALUE!', [4000, -46000], ['2015-01-04', '2019X06-27'], 0.1, ], 'If any entry in values is not numeric, returns the #VALUE! error value' => [ '#VALUE!', ['y', -46000], ['2015-01-04', '2019-06-27'], 0.1, ], 'If values is not an array, returns the #NUM! error value' => [ '#NUM!', -46000, ['2015-01-04', '2019-06-27'], 0.1, ], 'If dates is not an array but values is, returns the #NUM! error value' => [ '#NUM!', [4000, -46000], '2015-01-04', 0.1, ], 'If neither dates nor values is an array, returns the #N/A error value' => [ '#N/A', 4000, '2015-01-04', 0.1, ], 'Return VALUE error if guess is non-numeric' => [ '#VALUE!', [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-27', '2019-06-20', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], 'XYZ', ], 'Dates can be in any order after all' => [ 0.137963527441025, [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-27', '2019-06-20', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], 0.1, ], 'XIRR calculation #0 is incorrect' => [ 0.77868869226873, [4000, -46000], ['2015-04-01', '2019-06-27'], 0.1, ], 'issue 689' => [ -0.6118824173, [-1000000.706, 947003.58], ['2018-09-05', '2018-09-26'], ], 'issue 689 updated 2022-12-25' => [ -0.935842486, [-20972.36, 20350.545], ['2022-12-12', '2022-12-16'], ], 'XIRR calculation #1 is incorrect' => [ 0.137963527441025, [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], 0.1, ], 'XIRR calculation #2 is incorrect' => [ 0.09999999, [100.0, -110.0], ['2019-06-12', '2020-06-11'], 0.1, ], 'XIRR calculation #3 is incorrect' => [ 3235.159644, [1.0, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-27', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], ], 'XIRR calculation #4 is incorrect' => [ 0.15467888, [1893.67, 139947.43, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], ], 'XIRR calculation #5 is incorrect' => [ -0.197387315, [-100, 20, 40, 25], ['2010-01-01', '2010-04-01', '2010-10-01', '2011-02-01'], ], 'XIRR calculation #6 is incorrect' => [ 3.434984565, [-10000, 2750, 4250, 3250, 2750, 46000], ['2008-01-01', '2008-03-01', '2008-10-30', '2009-02-15', '2009-04-01', '2009-06-01'], ], 'Substitute for guess=0' => [ 0.13796353, [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], 0.00000, ], 'Substitute when guess is empty cell' => [ 0.13796353, [139947.43, 1893.67, 52573.25, 48849.74, 26369.16, -273029.18], ['2019-06-20', '2019-06-27', '2019-06-21', '2019-06-24', '2019-06-27', '2019-07-27'], 'C1', ], 'Can\'t find a result2 that works after FINANCIAL_MAX_ITERATIONS tries, the #NUM! error value is returned' => [ '#NUM!', [-10000, 10000, -10000, 5], ['2010-01-15', '2010-04-16', '2010-07-16', '2010-10-15'], ], 'See issue #2469 - non-convergence with initial guess' => [ -0.642307613, [55600, -51094.83], ['2021-11-24', '2021-12-24'], ], 'See issue #2469 - non-convergence with initial guess equal to correct answer' => [ -0.642307613, [55600, -51094.83], ['2021-11-24', '2021-12-24'], -0.642307613, ], 'Only one argument should cause exception' => [ 'exception', ['2021-11-24', '2021-12-24'], ], 'No argument should cause exception' => [ 'exception', ], 'DeCampo One year no growth' => [ 0, [-1000, 1000], ['2010-01-01', '2011-01-01'], ], 'DeCampo One year growth' => [ 0.1, [-1000, 1100], ['2010-01-01', '2011-01-01'], ], 'DeCampo One year decline' => [ -0.1, [-1000, 900], ['2010-01-01', '2011-01-01'], ], 'DeCampo vs spreadsheet' => [ 0.1212676, [-1000, -1000, -1000, -1000, 4300], ['2010-01-01', '2010-04-01', '2010-07-01', '2010-10-01', '2011-01-01'], ], 'DeCampo vs spreadsheet reordered' => [ 0.1212676, [-1000, 4300, -1000, -1000, -1000], ['2010-10-01', '2011-01-01', '2010-07-01', '2010-01-01', '2010-04-01'], ], 'DeCampo Over 100% growth' => [ 2.0, [-1000, 3000], ['2010-01-01', '2011-01-01'], ], 'DeCampo Total loss one year, agree with Excel not DeCampo' => [ '#NUM!', // -1.0, DeCampo accounts for this case, Excel doesn't [-1000, 0], ['2010-01-01', '2011-01-01'], ], 'DeCampo Total loss two years, agree with Excel not DeCampo' => [ '#NUM!', // -1.0, DeCampo accounts for this case, Excel doesn't [-1000, 0], ['2010-01-01', '2012-01-01'], ], 'DeCampo Readme example' => [ 0.2504234710540838, [-1000, -2500, -1000, 5050], ['2016-01-15', '2016-02-08', '2016-04-17', '2016-08-24'], ], 'DeCampo from nodejs' => [ 0.2126861, [-10000, 3027.25, 630.68, 2018.2, 1513.62, 1765.89, 4036.33, 4036.33, 1513.62, 1513.62, 2018.16, 1513.62, 1009.08, 1513.62, 1513.62, 1765.89, 1765.89, 22421.55], ['2000-05-24', '2000-06-05', '2001-04-09', '2004-02-24', '2005-03-18', '2006-02-15', '2007-01-10', '2007-11-14', '2008-12-17', '2010-01-15', '2011-01-14', '2012-02-03', '2013-01-18', '2014-01-24', '2015-01-30', '2016-01-22', '2017-01-20', '2017-06-05'], ], 'DeCampo issue5a, agree with DeCampo not Excel' => [ -0.7640294, // '#NUM!' [-2610, -2589, -5110, -2550, -5086, -2561, -5040, -2552, -2530, 29520], ['2001-06-22', '2001-07-03', '2001-07-05', '2001-07-06', '2001-07-09', '2001-07-10', '2001-07-12', '2001-07-13', '2001-07-16', '2001-07-17'], ], 'DeCampo issue5b, agree with DeCampo not Excel' => [ -0.8353404, // '#NUM!' [-2610, -2589, -5110, -2550, -5086, -2561, -5040, -2552, -2530, -9840, 38900], ['2001-06-22', '2001-07-03', '2001-07-05', '2001-07-06', '2001-07-09', '2001-07-10', '2001-07-12', '2001-07-13', '2001-07-16', '2001-07-17', '2001-07-18'], ], 'Python XIRR test line 20' => [ 412461.6383, [-100, 1000], ['2019-12-31', '2020-03-05'], ], 'Python XIRR test line 21' => [ 1.223853529e16, [-2236.3994659663, -47.3417585212, -46.52619316339632, 10424.74612565936, -13.077972551952], ['2017-12-16', '2017-12-26', '2017-12-29', '2017-12-31', '2017-12-20'], ], 'Python XIRR test line 39, agree with Python not Excel' => [ -1, // '#NUM!', [18902, 83600, -5780, -4080, -56780, -2210, -2380, 33975, 23067.98, -1619.57], ['2016-04-06', '2016-05-04', '2016-05-12', '2017-05-08', '2017-07-03', '2018-05-07', '2019-05-06', '2019-10-01', '2020-03-13', '2020-05-07'], ], 'Issue 3297, Excel gives wrong answer' => [ -.379332733303311, // 2.98023223876953E-09, [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749], ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/YIELDDISC.php
tests/data/Calculation/Financial/YIELDDISC.php
<?php declare(strict_types=1); return [ [ 0.05282257198685834, '16-Feb-2008', '1-Mar-2008', 99.795, 100, 2, ], [ 0.06220123250590336, '1-Jan-2017', '30-Jun-2017', 97, 100, ], [ 0.06220123250590336, '1-Jan-2017', '30-Jun-2017', 97, 100, 0, ], [ 0.06220123250590336, '1-Jan-2017', '30-Jun-2017', 97, 100, null, ], [ '#VALUE!', 'Invalid', '30-Jun-2017', 97, 100, ], [ '#VALUE!', '1-Jan-2017', 'Invalid', 97, 100, ], [ '#VALUE!', '1-Jan-2017', '30-Jun-2017', 'NaN', 100, ], [ '#VALUE!', '1-Jan-2017', '30-Jun-2017', 97, 'NaN', ], [ '#NUM!', '1-Jan-2017', '30-Jun-2017', -97, 100, ], [ '#NUM!', '1-Jan-2017', '30-Jun-2017', 97, -100, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PRICEMAT.php
tests/data/Calculation/Financial/PRICEMAT.php
<?php declare(strict_types=1); return [ [ 99.98449887555694, '15-Feb-2008', '13-Apr-2008', '11-Nov-2007', 0.061, 0.061, 0, ], [ 99.98449887555694, '15-Feb-2008', '13-Apr-2008', '11-Nov-2007', 0.061, 0.061, null, ], [ 106.8486842105263, '1-Apr-2017', '31-Mar-2021', '1-Jan-2017', 0.055, 0.035, ], [ 93.0909090909091, '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, 0.08, ], [ '#VALUE!', 'Invalid Date', '1-Jan-2027', '1-Jan-2017', 0.07, 0.08, ], [ '#VALUE!', '1-Jul-2017', 'Invalid Date', '1-Jan-2017', 0.07, 0.08, ], [ '#VALUE!', '1-Jul-2017', '1-Jan-2027', 'Invalid Date', 0.07, 0.08, ], [ '#VALUE!', '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 'NaN', 0.08, ], [ '#NUM!', '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', -0.07, 0.08, ], [ '#VALUE!', '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, 'NaN', ], [ '#NUM!', '1-Jul-2017', '1-Jan-2027', '1-Jan-2017', 0.07, -0.08, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/FVSCHEDULE.php
tests/data/Calculation/Financial/FVSCHEDULE.php
<?php declare(strict_types=1); // principal, schedule, Result return [ [ 1.3308899999999999, 1, [ 0.089999999999999997, 0.11, 0.10000000000000001, ], ], [ 13.3089, 10, [ 0.089999999999999997, 0.11, 0.10000000000000001, ], ], [ 12223.614571874999, 10000, [ 0.050000000000000003, 0.050000000000000003, 0.035000000000000003, 0.035000000000000003, 0.035000000000000003, ], ], [ '#VALUE!', 'NaN', [ 0.089999999999999997, 0.11, 0.10000000000000001, ], ], [ '#VALUE!', 100, [ 0.089999999999999997, 'NaN', 0.10000000000000001, ], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PPMT.php
tests/data/Calculation/Financial/PPMT.php
<?php declare(strict_types=1); return [ [ -75.623186008367, [0.10 / 12, 1, 2 * 12, 2000], ], [ -91.597714484189, [-0.10 / 12, 1, 2 * 12, 2000], ], [ -27598.053462421, [0.08, 10, 10, 200000], ], [ -13356.484444134500, [-0.08, 10, 10, 200000], ], [ -735.22834886722, [0.05 / 12, 1, 60, 50000], ], [ -940.107483227145, [-0.05 / 12, 1, 60, 50000], ], [ -738.29180032083, [0.05 / 12, 2, 60, 50000], ], [ -936.190368713698, [-0.05 / 12, 2, 60, 50000], ], [ -600.85202718047, [0.035 / 4, 1, 8, 0, 5000, 1], ], [ -606.109482418299, [0.035 / 4, 2, 8, 0, 5000, 1], ], [ '#VALUE!', ['NaN', 2, 8, 0, 5000, 1], ], [ '#VALUE!', [0.035 / 4, 'NaN', 8, 0, 5000, 1], ], [ '#VALUE!', [0.035 / 4, 2, 'NaN', 0, 5000, 1], ], [ '#VALUE!', [0.035 / 4, 2, 8, 'NaN', 5000, 1], ], [ '#VALUE!', [0.035 / 4, 2, 8, 0, 'NaN', 1], ], [ '#VALUE!', [0.035 / 4, 2, 8, 0, 5000, 'NaN'], ], [ '#NUM!', [0.035 / 4, 0, 8, 0, 5000, 1], ], [ '#NUM!', [0.035 / 4, 4, 2, 0, 5000, 1], ], [ '#NUM!', [0.035 / 4, 2, 8, 0, 5000, 2], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PDURATION.php
tests/data/Calculation/Financial/PDURATION.php
<?php declare(strict_types=1); return [ [ 10.33803507, [0.04, 10000, 15000], ], [ 3.859866162622655, [0.025, 2000, 2200], ], [ 87.6054764193714, [0.025 / 12, 1000, 1200], ], [ 3.5644379226484437, [0.03, 9000, 10000], ], [ 14.206699082890474, [0.05, 50, 100], ], [ '#VALUE!', ['NaN', 50, 100], ], [ '#VALUE!', [0.05, 'NaN', 100], ], [ '#VALUE!', [0.05, 50, 'NaN'], ], [ '#NUM!', [-0.10, 50, 100], ], [ '#NUM!', [0.00, 50, 100], ], [ '#NUM!', [0.05, 0, 100], ], [ '#NUM!', [0.05, 50, 0], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPNUM.php
tests/data/Calculation/Financial/COUPNUM.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 4, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 8, '2011-01-01', '2012-10-25', 4, 0, ], [ 8, '2011-01-01', '2012-10-25', 4, null, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 5, '01-Jan-2008', '31-Dec-2012', 1, 1, ], [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 1, '23-Dec-2000', '24-Dec-2000', 4, 0, ], [ 1, '24-Sep-2000', '24-Dec-2000', 4, 0, ], [ 2, '23-Sep-2000', '24-Dec-2000', 4, 0, ], [ 16, '1-Apr-2012', '31-Mar-2020', 2, 0, ], [ 16, '1-Apr-2012', '31-Mar-2020', 2, 1, ], [ 16, '1-Apr-2012', '31-Mar-2020', 2, 2, ], [ 16, '1-Apr-2012', '31-Mar-2020', 2, 3, ], [ 16, '1-Apr-2012', '31-Mar-2020', 2, 4, ], [ 1, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 1, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 2, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 1, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 1, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 1, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 1, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 1, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 3, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 1, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 1, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 1, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 1, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 1, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 5, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 1, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 1, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 1, '31-Jan-2021', '20-Mar-2021', 4, 4, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/IPMT.php
tests/data/Calculation/Financial/IPMT.php
<?php declare(strict_types=1); // rate, per, nper, pv, fv, type, Result return [ [ -22.858787457480013, [0.0085, 3, 3, 8000], ], [ 22.473454124370, [-0.0085, 3, 3, 8000], ], [ -292.44712990937001, [0.10, 3, 3, 8000], ], [ 239.114391143911, [-0.10, 3, 3, 8000], ], [ -212.50, [0.00425, 1, 60, 50000], ], [ 212.50, [-0.00425, 1, 60, 50000], ], [ -209.38324500656188, [0.00425, 2, 60, 50000], ], [ 208.495090812845, [-0.00425, 2, 60, 50000], ], [ 0.0, [0.00875, 1, 8, 10000, 5000, 1], ], [ 0.0, [-0.00875, 1, 8, 10000, 5000, 1], ], [ -70.968650395558996, [0.00875, 2, 8, 10000, 5000, 1], ], [ 71.207753426393, [-0.00875, 2, 8, 10000, 5000, 1], ], [ '#VALUE!', ['NaN', 2, 8, 10000, 5000, 1], ], [ '#VALUE!', [0.00875, 'NaN', 8, 10000, 5000, 1], ], [ '#VALUE!', [0.00875, 2, 'NaN', 10000, 5000, 1], ], [ '#VALUE!', [0.00875, 2, 8, 'NaN', 5000, 1], ], [ '#VALUE!', [0.00875, 2, 8, 10000, 'NaN', 1], ], [ '#VALUE!', [0.00875, 2, 8, 10000, 5000, 'NaN'], ], [ '#NUM!', [0.00875, 2, 8, 10000, 5000, 2], ], [ '#NUM!', [0.005, -1, 8, 2500, 200, 1], ], [ '#NUM!', [0.005, 8, 2, 2500, 200, 1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPPCD.php
tests/data/Calculation/Financial/COUPPCD.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 39036, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 40476, '2011-01-01', '2012-10-25', 4, ], [ 40476, '2011-01-01', '2012-10-25', 4, null, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 36793, '23-Dec-2000', '24-Dec-2000', 4, 0, ], [ 36793, '24-Sep-2000', '24-Dec-2000', 4, 0, ], [ 36701, '23-Sep-2000', '24-Dec-2000', 4, 0, ], [ 43910, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 43910, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 43544, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 43910, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 43910, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 43910, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 44094, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 44094, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 43728, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 44094, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 44094, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 44094, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 44185, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 44185, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 43819, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 44185, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 44185, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 44185, '31-Jan-2021', '20-Mar-2021', 4, 4, ], [ 43555, '05-Apr-2019', '30-Sep-2021', 2, 0, ], [ 43738, '05-Oct-2019', '31-Mar-2022', 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/CUMIPMT.php
tests/data/Calculation/Financial/CUMIPMT.php
<?php declare(strict_types=1); // rate, nper, pv, start_period, end_period, type, result return [ [ -11135.232130750999, 0.0075, 360, 125000, 13, 24, 0, ], [ -937.5, 0.0075, 360, 125000, 1, 1, 0, ], [ -937.5, 0.0075, 360, 125000, 1, 1, null, ], [ -2299.6141712553544, 0.004175, 60, 50000, 1, 12, 0, ], [ -1836.8883999349455, 0.004175, 60, 50000, 13, 24, 0, ], [ -1350.4402595996685, 0.004175, 60, 50000, 25, 36, 0, ], [ -839.0535854569902, 0.004175, 60, 50000, 37, 48, 0, ], [ -301.4498641014851, 0.004175, 60, 50000, 49, 60, 0, ], [ '#VALUE!', 'NaN', 360, 125000, 24, 13, 0, ], [ '#VALUE!', 0.0075, 'NaN', 125000, 24, 13, 0, ], [ '#VALUE!', 0.0075, 360, 'NaN', 24, 13, 0, ], [ '#VALUE!', 0.0075, 360, 125000, 'NaN', 13, 0, ], [ '#VALUE!', 0.0075, 360, 125000, 24, 'NaN', 0, ], [ '#VALUE!', 0.0075, 360, 125000, 24, 13, 'NaN', ], [ '#NUM!', 0.0075, 360, 125000, 13, 24, 2, ], [ '#NUM!', 0.0075, 10, 125000, 24, 13, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/AMORLINC.php
tests/data/Calculation/Financial/AMORLINC.php
<?php declare(strict_types=1); // Cost, Date purchased, End of the 1st period, Salvage, Period, Depreciation, Basis, Result return [ [ 360, 2400, '2008-08-19', '2008-12-31', 300, 1, 0.15, 1, ], [ 576, 2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 1, ], [ 576, 2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, 0, ], [ 576, 2400, '2008-08-19', '2008-12-31', 300, 2, 0.24, null, ], [ 30, 150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 4, ], [ 22.41666667, 150, '2011-01-01', '2011-09-30', 20, 0, 0.2, 4, ], [ 17.58333333, 150, '2011-01-01', '2011-09-30', 20, 4, 0.2, 4, ], [ 0.0, 150, '2011-01-01', '2011-09-30', 20, 5, 0.2, 4, ], [ '#VALUE!', 'NaN', '2011-01-01', '2011-09-30', 20, 1, 0.2, 4, ], [ '#VALUE!', 150, '2011-01-01', 'notADate', 20, 1, 0.2, 4, ], [ '#VALUE!', 150, 'notADate', '2011-09-30', 20, 1, 0.2, 4, ], [ '#VALUE!', 150, '2011-01-01', '2011-09-30', 'NaN', 1, 0.2, 4, ], [ '#VALUE!', 150, '2011-01-01', '2011-09-30', 20, 'NaN', 0.2, 4, ], [ '#VALUE!', 150, '2011-01-01', '2011-09-30', 20, 1, 'NaN', 4, ], [ '#VALUE!', 150, '2011-01-01', '2011-09-30', 20, 1, 0.2, 'NaN', ], [ '#NUM!', 550, '2012-03-01', '2020-12-25', 20, 1, 0.2, 99, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/ACCRINT.php
tests/data/Calculation/Financial/ACCRINT.php
<?php declare(strict_types=1); // Issue date, 1st Interest, Settlement, Rate, Par, Freq, Basis, Result return [ [ 16.6666666666666, '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0, ], [ 15.5555555555559, '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0, ], [ 15.5555555555559, '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, null, ], [ 15.5555555555559, '2008-03-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0, ], [ 7.22222222222222, '2008-04-05', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0, ], [ 200, '2010-01-01', '2010-06-30', '2010-04-01', 0.08, 10000, 4, ], [ 1600, '2012-01-01', '2012-04-01', '2013-12-31', 0.08, 10000, 4, ], [ 32.363013698630134, '2012-01-01', '2012-03-31', '2012-02-15', 0.0525, 5000, 4, 3, ], [ 6.472602739726027, '2012-01-01', '2012-03-31', '2012-02-15', 0.0525, 1000, 4, 3, ], [ 18.05555555555555, '2017-08-05', '2017-11-10', '2017-10-10', 0.05, 2000, 4, 0, ], [ '#NUM!', '2008-03-05', '2008-08-31', '2008-05-01', -0.10, 1000, 2, 0, ], [ '#VALUE!', 'Invalid Date', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 0, ], [ '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', 'ABC', 1000, 2, 0, ], 'Non-numeric Rate' => [ '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', 'NaN', 1000, 2, 0, ], 'Invalid Rate' => [ '#NUM!', '2008-03-01', '2008-08-31', '2008-05-01', -0.10, 1000, 2, 0, ], 'Non-numeric Par Value' => [ '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 'NaN', 2, 0, ], 'Invalid Par Value' => [ '#NUM!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, -1000, 2, 0, ], 'Non-numeric Frequency' => [ '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 'NaN', 0, ], 'Invalid Frequency' => [ '#NUM!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, -1000, 3, 0, ], 'Non-numeric Basis' => [ '#VALUE!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, 'ABC', ], 'Invalid Basis' => [ '#NUM!', '2008-03-01', '2008-08-31', '2008-05-01', 0.10, 1000, 2, -2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/RECEIVED.php
tests/data/Calculation/Financial/RECEIVED.php
<?php declare(strict_types=1); return [ [ 1014584.6544071021, '15-Feb-2008', '15-May-2008', 1000000, 0.0575, 2, ], [ 1120.2128404396835, '6-Jul-2017', '15-Jan-2020', 1000, 0.0425, ], [ 1120.2128404396835, '6-Jul-2017', '15-Jan-2020', 1000, 0.0425, null, ], [ 273037.54266211606, '15-Feb-2008', '15-Nov-2017', 100000, 0.065, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2017', 100000, 0.065, 0, ], [ '#VALUE!', '15-Feb-2008', 'Invalid Date', 100000, 0.065, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 'NaN', 0.065, 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 100000, 'NaN', 0, ], [ '#VALUE!', '15-Feb-2008', '15-Nov-2017', 100000, 0.065, 'NaN', ], [ '#NUM!', '15-Feb-2008', '15-Nov-2017', -1000, 0.065, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DISC.php
tests/data/Calculation/Financial/DISC.php
<?php declare(strict_types=1); // settlement, maturity, price, redemption, basis, result return [ [ 0.052420213, '2007-01-25', '2007-06-15', 97.974999999999994, 100, 1, ], [ 0.01, '2010-04-01', '2015-03-31', 95, 100, ], [ 0.01, '2010-04-01', '2015-03-31', 95, 100, null, ], [ '#NUM!', '2010-04-01', '2015-03-31', 0, 100, ], [ '#VALUE!', '2010-04-01', '2015-03-31', 'ABC', 100, ], [ '#VALUE!', 'Invalid Date', '2007-06-15', 97.974999999999994, 100, 1, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPDAYBS.php
tests/data/Calculation/Financial/COUPDAYBS.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 71, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 66, '2011-01-01', '2012-10-25', 4, ], [ 66, '2011-01-01', '2012-10-25', 4, null, ], [ 71, '2011-01-25', '2011-11-15', 2, 1, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 311, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 317, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 317, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 317, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 317, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 310, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 131, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 133, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 133, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 133, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 133, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 130, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 41, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 42, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 42, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 42, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 42, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 40, '31-Jan-2021', '20-Mar-2021', 4, 4, ], [ 5, '05-Apr-2019', '30-Sep-2021', 2, 0, ], [ 5, '05-Oct-2019', '31-Mar-2022', 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/EFFECT.php
tests/data/Calculation/Financial/EFFECT.php
<?php declare(strict_types=1); // nominal_rate, npery, Result use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [ 0.053542667370758003, 0.052499999999999998, 4, ], [ 0.103812890625, 0.10000000000000001, 4, ], [ 0.10249999999999999, 0.10000000000000001, 2, ], [ 0.025156250000000002, 0.025000000000000001, 2, ], [ ExcelError::NAN(), 0.025, -1, ], [ ExcelError::NAN(), -0.025, 1, ], [ ExcelError::VALUE(), 0.025, 'NaN', ], [ ExcelError::VALUE(), 'NaN', 1, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPDAYSNC.php
tests/data/Calculation/Financial/COUPDAYSNC.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 110, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 24, '2011-01-01', '2012-10-25', 4, ], [ 24, '2011-01-01', '2012-10-25', 4, null, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 49, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 49, '01-Feb-2021', '20-Mar-2021', 1, 0, ], [ 48, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 49, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 48, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 48, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 50, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 49, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 49, '01-Feb-2021', '20-Mar-2021', 2, 0, ], [ 48, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 49, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 48, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 48, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 50, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 49, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 49, '01-Feb-2021', '20-Mar-2021', 4, 0, ], [ 48, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 49, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 48, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 48, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 50, '31-Jan-2021', '20-Mar-2021', 4, 4, ], [ 175, '05-Apr-2019', '30-Sep-2021', 2, 0, ], // Excel and LibreOffice return 175 for the following calculation. // Gnumeric returns 176. // My hand calculation, hardly guaranteed, agrees with Gnumeric. [ 176, '05-Oct-2019', '31-Mar-2022', 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PMT.php
tests/data/Calculation/Financial/PMT.php
<?php declare(strict_types=1); return [ [ -1037.032089359164, [0.08 / 12, 10, 10000], ], [ -963.701199976010, [-0.08 / 12, 10, 10000], ], [ -1030.164327177977, [0.08 / 12, 10, 10000, null, 1], ], [ -970.168993264440, [-0.08 / 12, 10, 10000, null, 1], ], [ -129.081160867995, [0.06 / 12, 18 * 12, 0.0, 50000], ], [ -943.56168220055, [0.05 / 12, 60, 50000], ], [ -600.85202718047, [0.035 / 4, 8, 0, 5000, 1], ], [ -750.00, [0.0, 8, 1000, 5000, 1], ], [ '#VALUE!', ['NaN', 8, 0, 5000, 1], ], [ '#VALUE!', [0.035 / 4, 'NaN', 0, 5000, 1], ], [ '#VALUE!', [0.035 / 4, 8, 'NaN', 5000, 1], ], [ '#VALUE!', [0.035 / 4, 8, 0, 'NaN', 1], ], [ '#VALUE!', [0.035 / 4, 8, 0, 5000, 'NaN'], ], [ '#NUM!', [0.035 / 4, 8, 0, 5000, 2], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/PRICEDISC.php
tests/data/Calculation/Financial/PRICEDISC.php
<?php declare(strict_types=1); return [ [ 90.0, ['01-Apr-2017', '31-Mar-2021', 0.025, 100], ], [ 97.625, ['2008-02-15', '2008-11-30', 0.03, 100, null], ], [ 97.6311475409836, ['2008-02-15', '2008-11-30', 0.03, 100, 1], ], [ '#VALUE!', ['Invalid Date', '2008-11-30', 0.03, 100, 1], ], [ '#VALUE!', ['2008-02-15', 'Invalid Date', 0.03, 100, 1], ], [ '#VALUE!', ['2008-02-15', '2008-11-30', 'NaN', 100, 1], ], [ '#NUM!', ['2008-02-15', '2008-11-30', -0.03, 100, 1], ], [ '#VALUE!', ['2008-02-15', '2008-11-30', 0.03, 'NaN', 1], ], [ '#NUM!', ['2008-02-15', '2008-11-30', 0.03, -100, 1], ], [ '#VALUE!', ['2008-02-15', '2008-11-30', 0.03, 100, 'NaN'], ], [ '#NUM!', ['2008-02-15', '2008-11-30', 0.03, 100, -1], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/MIRR.php
tests/data/Calculation/Financial/MIRR.php
<?php declare(strict_types=1); // values, finance_rate, reinvestment_rate, Result return [ [ 0.12609413036591, [ -120000, [ 39000, 30000, 21000, 37000, 46000, ], ], 0.10, 0.12, ], [ -0.048044655249981, [ -120000, [ 39000, 30000, 21000, ], ], 0.10, 0.12, ], [ 0.13475911082830999, [ -120000, [ 39000, 30000, 21000, 37000, 46000, ], ], 0.10, 0.14, ], [ 0.74021752686287001, [ -100, [ 12, 14, 11, ], ], 5.5, 5, ], [ 1.8579321744785, [ -100, [ 12, 14, 11, 13, 16, ], ], 5.5, 5, ], 'first argument must be array' => [ '#DIV/0!', 999, 1.23, 2.34, ], 'all values are positive' => [ '#DIV/0!', [0.12, 0.13, 0.125], 1.23, 2.34, ], 'all values are negative' => [ '#DIV/0!', [-0.12, -0.13, -0.125], 1.23, 2.34, ], 'result is NaN' => [ '#NUM!', [-0.12, 0.13, 0.125], 1.23, -2.34, ], 'valid result even when reinvest rate < -1' => [ -0.205225399, [-0.12, 0.13, 0.25], 1.23, -2.34, ], 'exception for 2 arguments or fewer' => [ 'exception', [-0.12, 0.13, 0.25], 1.23, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPNCD.php
tests/data/Calculation/Financial/COUPNCD.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 39217, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 40568, '2011-01-01', '2012-10-25', 4, ], [ 40568, '2011-01-01', '2012-10-25', 4, null, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 36884, '23-Dec-2000', '24-Dec-2000', 4, 0, ], [ 36884, '24-Sep-2000', '24-Dec-2000', 4, 0, ], [ 36793, '23-Sep-2000', '24-Dec-2000', 4, 0, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 43910, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 43910, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 43910, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 44275, '31-Jan-2021', '20-Mar-2021', 4, 4, ], [ 44651, '30-Sep-2021', '31-Mar-2022', 2, 0, ], [ 44834, '31-Mar-2022', '30-Sep-2022', 2, 0, ], [ 43738, '05-Apr-2019', '30-Sep-2021', 2, 0, ], [ 43921, '05-Oct-2019', '31-Mar-2022', 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/SLN.php
tests/data/Calculation/Financial/SLN.php
<?php declare(strict_types=1); return [ [ 1800, [10000, 1000, 5], ], [ 1000, [10000, 5000, 5], ], [ 1142.857142857143, [8000, 0, 7], ], [ 50, [500, 100, 8], ], [ 2250, [30000, 7500, 10], ], [ 166.66666666666666, [1200, 200, 6], ], [ 3750, [45000, 7500, 10], ], [ -10500, [12000, 1500, -1], ], [ 21000, [12000, 1500, 0.5], ], [ 3250, [12000, -1000, 4], ], [ -250, [0, 1000, 4], ], [ -600, [12000, 15000, 5], ], [ '#DIV/0!', [12000, 1500, 0], ], [ '#VALUE!', ['INVALID', 1000, 1], ], [ '#VALUE!', [12000, 'INVALID', 1], ], [ '#VALUE!', [12000, 1000, 'INVALID'], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/XNPV.php
tests/data/Calculation/Financial/XNPV.php
<?php declare(strict_types=1); // result, message, rate, values, dates return [ 'If rate is not numeric, returns the #VALUE! error value' => [ '#VALUE!', 'xyz', [0, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000], ['2018-06-30', '2018-12-31', '2019-12-31', '2020-12-31', '2021-12-31', '2022-12-31', '2023-12-31', '2024-12-31', '2025-12-31', '2026-12-31', '2027-12-31'], ], 'Okay to specify values and dates as non-array' => [ 1000.0, 0.10, 1000.0, '2018-06-30', ], 'If different number of elements in values and dates, return NUM' => [ '#NUM!', 0.10, [1000.0, 1000.1], '2018-06-30', ], 'If minimum value > 0, return NUM' => [ '#NUM!', 0.10, [1000.0, 1000.1], ['2018-06-30', '2018-07-30'], ], 'If maximum value < 0, return NUM' => [ '#NUM!', 0.10, [-1000.0, -1000.1], ['2018-06-30', '2018-07-30'], ], 'If any value is non-numeric, return VALUE' => [ '#VALUE!', 0.10, [-1000.0, 1000.1, 'x'], ['2018-06-30', '2018-07-30', '2018-08-30'], ], 'If first date is non-numeric, return VALUE' => [ '#VALUE!', 0.10, [-1000.0, 1000.1, 1000.2], ['2018-06x30', '2018-07-30', '2018-08-30'], ], 'If any other date is non-numeric, return VALUE' => [ '#VALUE!', 0.10, [-1000.0, 1000.1, 1000.2], ['2018-06-30', '2018-07-30', '2018-08z30'], ], 'If any date is before first date, return NUM' => [ '#NUM!', 0.10, [-1000.0, 1000.1, 1000.2], ['2018-06-30', '2018-07-30', '2018-05-30'], ], 'XNPV calculation #1 is incorrect' => [ 772830.734, 0.10, [0, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000, 120000], ['2018-06-30', '2018-12-31', '2019-12-31', '2020-12-31', '2021-12-31', '2022-12-31', '2023-12-31', '2024-12-31', '2025-12-31', '2026-12-31', '2027-12-31'], ], 'Gnumeric gets this right, Excel returns #NUM, Libre now gets it right' => [ 22.257507852701, -0.10, [-100.0, 110.0], ['2019-12-31', '2020-12-31'], ], 'Issue 3297 another case where Excel goes wrong' => [ 0, -0.6118824173, [-1000000.706, 947003.58], ['2018-09-05', '2018-09-26'], ], 'Issue 3297 using correct XIRR calculation' => [ 0, -.379332733303311, [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749], ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'], ], 'Issue 3297 using incorrect Excel XIRR calculation' => [ -50210.188872963656, 2.98023223876953E-09, [-19646.10172, -22288.58964, -1483.5, -12597.54406, -46629.45777, -2472.769, 0, -25616.37076, -30055.68344, 1038.5, -13621.9742, 13629.539, -36736.0694, -944.605609, -49020.77156, 27308.87082, -63912.64722, 8764.136, 3162, -23946.7257, -5428.8, -83899.24172, 58242.82346, -11147.78101, 287092.5749], ['2022-05-02', '2022-05-31', '2022-06-01', '2022-06-26', '2022-06-30', '2022-07-01', '2022-07-15', '2022-07-31', '2022-09-02', '2022-09-05', '2022-09-27', '2022-09-28', '2022-09-29', '2022-10-03', '2022-10-06', '2022-10-10', '2022-11-01', '2022-11-03', '2022-11-04', '2022-12-01', '2022-12-02', '2022-12-28', '2022-12-30', '2023-01-02', '2023-01-13'], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/ACCRINTM.php
tests/data/Calculation/Financial/ACCRINTM.php
<?php declare(strict_types=1); // Issue date, Settlement, Rate, Par, Basis, Result return [ [ 20.547945205478999, '2008-04-01', '2008-06-15', 0.10, 1000, 3, ], [ 800, '2010-01-01', '2010-12-31', 0.08, 10000, ], [ 800, '2010-01-01', '2010-12-31', 0.08, 10000, null, ], [ 365.958904109589, '2012-01-01', '2013-02-15', 0.065, 5000, 3, ], [ 73.1917808219178, '2012-01-01', '2013-02-15', 0.065, 1000, 3, ], [ '#NUM!', '2008-03-05', '2008-08-31', -0.10, 1000, 2, ], [ '#VALUE!', 'Invalid Date', '2008-08-31', 0.10, 1000, 2, ], 'Non-numeric Rate' => [ '#VALUE!', '2008-03-01', '2008-08-31', 'NaN', 1000, 2, ], 'Invalid Rate' => [ '#NUM!', '2008-03-01', '2008-08-31', -0.10, 1000, 2, ], 'Non-numeric Par Value' => [ '#VALUE!', '2008-03-01', '2008-08-31', 0.10, 'NaN', 2, ], 'Invalid Par Value' => [ '#NUM!', '2008-03-01', '2008-08-31', 0.10, -1000, 2, ], 'Non-numeric Basis' => [ '#VALUE!', '2008-03-01', '2008-08-31', 0.10, 1000, 'NaN', ], 'Invalid Basis' => [ '#NUM!', '2008-03-01', '2008-08-31', 0.10, 1000, 99, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DaysPerYear.php
tests/data/Calculation/Financial/DaysPerYear.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Financial\Constants as FinancialConstants; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_NASD], [366, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL], [365, 2021, FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL], [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_360], [365, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_365], [360, 2020, FinancialConstants::BASIS_DAYS_PER_YEAR_360_EUROPEAN], [ExcelError::NAN(), 2020, 'Invalid'], [ExcelError::NAN(), 2020, 999], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/ISPMT.php
tests/data/Calculation/Financial/ISPMT.php
<?php declare(strict_types=1); // rate, per, nper, pv, result return [ [ -66111.111111111, 0.0085, 1, 36, 8000000, ], [ -533333.33333333, 0.10, 1, 3, 8000000, ], [ -205.270833333, 0.004175, 1, 60, 50000, ], [ -201.791666667, 0.004175, 2, 60, 50000, ], [ 0.0, 0.00, 1, 3, 8000000, ], [ 0.0, 0.125, 3, 3, 8000000, ], [ '#VALUE!', 'NaN', 3, 3, 8000000, ], [ '#VALUE!', 0.125, 'NaN', 3, 8000000, ], [ '#VALUE!', 0.125, 3, 'NaN', 8000000, ], [ '#VALUE!', 0.125, 3, 3, 'NaN', ], [ '#NUM!', 0.125, -1, 3, 800000, ], [ '#NUM!', 0.125, 4, 3, 800000, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/INTRATE.php
tests/data/Calculation/Financial/INTRATE.php
<?php declare(strict_types=1); // Settlement, Maturity, Investment, Redemption, Basis, Result return [ [ 0.05768, '2008-02-15', '2008-05-15', 1000000, 1014420, 2, ], [ 0.225, '2005-04-01', '2010-03-31', 1000, 2125, ], [ 0.225, '2005-04-01', '2010-03-31', 1000, 2125, null, ], [ '#VALUE!', '2008-02-15', '2008-05-15', 1000000, 1014420, 'ABC', ], [ '#NUM!', '2008-02-15', '2008-05-15', 1000000, -1014420, 2, ], [ '#VALUE!', 'Invalid Date', '2008-05-15', 1000000, 1014420, 2, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/DDB.php
tests/data/Calculation/Financial/DDB.php
<?php declare(strict_types=1); // cost, salvage, life, period, month, result return [ [ 0.13150684931507001, 2400, 300, 36500, 1, ], [ 0.13149964346031001, 2400, 300, 36500, 2, ], [ 0.13146362010870999, 2400, 300, 36500, 7, ], [ 0.91843145432707995, 2400, 300, 36500, 7, 14, ], [ 40.0, 2400, 300, 120, 1, 2, ], [ 480.0, 2400, 300, 10, 1, 2, ], [ 306.0, 2400, 300, 10, 2, 1.5, ], [ 22.122547200000302, 2400, 300, 10, 10, ], [ 4000.0, 10000, 1000, 5, 1, ], [ 2400.0, 10000, 1000, 5, 2, ], [ 1440.0, 10000, 1000, 5, 3, ], [ 864.0, 10000, 1000, 5, 4, ], [ 296.0, 10000, 1000, 5, 5, ], [ 972.0, 12000, 1000, 5, 3, 0.5, ], [ 1259.4752186588921, 12000, 1000, 3.5, 3, 0.5, ], [ 1080.00, 12000, 1000, 5, 2, 0.5, ], [ 0.0, 12000, 15000, 5, 2, 0.5, ], // Code does not yet handle fractional period values for DDB, only integer // [ // 1024.58, // 12000, // 1000, // 5, // 2.5, // 0.5, // ], [ '#NUM!', -2400, 300, 36500, 1, ], [ '#VALUE!', 'ABC', 300, 36500, 1, ], [ '#VALUE!', 12000, 'INVALID', 5, 3, 0.5, ], [ '#VALUE!', 12000, 1000, 'INVALID', 3, 0.5, ], [ '#VALUE!', 12000, 1000, 5, 'INVALID', 0.5, ], [ '#VALUE!', 12000, 1000, 5, 3, 'INVALID', ], [ '#NUM!', 12000, -1000, 5, 3, 0.5, ], [ '#NUM!', 12000, 1000, 5, -3, 0.5, ], [ '#NUM!', 12000, 1000, 5, 3, -0.5, ], [ '#NUM!', 12000, 1000, 5, 0, 0.5, ], [ '#NUM!', 12000, 1000, 2, 3, 0.5, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/COUPDAYS.php
tests/data/Calculation/Financial/COUPDAYS.php
<?php declare(strict_types=1); // Settlement, Maturity, Frequency, Basis, Result return [ [ 181, '25-Jan-2007', '15-Nov-2008', 2, 1, ], [ 90, '2011-01-01', '2012-10-25', 4, ], [ 90, '2011-01-01', '2012-10-25', 4, null, ], [ 182.5, '25-Jan-2007', '15-Nov-2008', 2, 3, ], [ 365, '25-Jan-2007', '15-Nov-2008', 1, 1, ], [ 365, '25-Jan-2010', '15-Nov-2011', 1, 1, ], [ '#VALUE!', 'Invalid Date', '15-Nov-2008', 2, 1, ], [ '#VALUE!', '25-Jan-2007', 'Invalid Date', 2, 1, ], 'Invalid Frequency' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 3, 1, ], 'Non-Numeric Frequency' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 'NaN', 1, ], 'Invalid Basis' => [ '#NUM!', '25-Jan-2007', '15-Nov-2008', 4, -1, ], 'Non-Numeric Basis' => [ '#VALUE!', '25-Jan-2007', '15-Nov-2008', 4, 'NaN', ], 'Same Date' => [ '#NUM!', '24-Dec-2000', '24-Dec-2000', 4, 0, ], [ 360, '31-Jan-2021', '20-Mar-2021', 1, 0, ], [ 365, '31-Jan-2021', '20-Mar-2021', 1, 1, ], [ 366, '31-Jan-2020', '20-Mar-2021', 1, 1, ], [ 360, '31-Jan-2021', '20-Mar-2021', 1, 2, ], [ 365, '31-Jan-2021', '20-Mar-2021', 1, 3, ], [ 360, '31-Jan-2021', '20-Mar-2021', 1, 4, ], [ 180, '31-Jan-2021', '20-Mar-2021', 2, 0, ], [ 181, '31-Jan-2021', '20-Mar-2021', 2, 1, ], [ 182, '31-Jan-2020', '20-Mar-2021', 2, 1, ], [ 180, '31-Jan-2021', '20-Mar-2021', 2, 2, ], [ 182.5, '31-Jan-2021', '20-Mar-2021', 2, 3, ], [ 180, '31-Jan-2021', '20-Mar-2021', 2, 4, ], [ 90, '31-Jan-2021', '20-Mar-2021', 4, 0, ], [ 90, '31-Jan-2021', '20-Mar-2021', 4, 1, ], [ 91, '31-Jan-2020', '20-Mar-2021', 4, 1, ], [ 90, '31-Jan-2021', '20-Mar-2021', 4, 2, ], [ 91.25, '31-Jan-2021', '20-Mar-2021', 4, 3, ], [ 90, '31-Jan-2021', '20-Mar-2021', 4, 4, ], [ 180, '05-Apr-2019', '30-Sep-2021', 2, 0, ], [ 180, '05-Oct-2019', '31-Mar-2022', 2, 0, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/TBILLYIELD.php
tests/data/Calculation/Financial/TBILLYIELD.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [ 0.09141696292534264, '31-Mar-2008', '1-Jun-2008', 98.45, ], [ ExcelError::VALUE(), 'Not a Valid Date', '1-Jun-2008', 98.45, ], [ ExcelError::VALUE(), '31-Mar-2008', 'Not a Valid Date', 98.45, ], [ ExcelError::VALUE(), '31-Mar-2008', '1-Jun-2008', 'NaN', ], [ ExcelError::NAN(), '31-Mar-2008', '1-Jun-2008', -1.25, ], [ ExcelError::NAN(), '31-Mar-2000', '1-Jun-2021', 97.25, ], [ ExcelError::NAN(), '1-Jun-2008', '31-Mar-2008', 97.25, ], [ 0.024405125076266018, '1-Feb-2017', '30-Jun-2017', 99, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/NPV.php
tests/data/Calculation/Financial/NPV.php
<?php declare(strict_types=1); // rate, values, result return [ [ 1188.4434123352, 0.10, -10000, 3000, 4200, 6800, ], [ 41922.061554931999, 0.08, 8000, 9200, 10000, 12000, 14500, ], [ 36250.534912984003, 0.08, 8000, 9200, 10000, 12000, 14500, -9000, ], [ 12678.677633095, 0.05, 2000, 2400, 2900, 3500, 4100, ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/RATE.php
tests/data/Calculation/Financial/RATE.php
<?php declare(strict_types=1); // Periods, Payment, Present Value, Future Value, Type, Guess, Result return [ [ 0.0077014724882014003, 48, -200, 8000, ], [ 0.046781916422493401, 60, -6000, 120000, ], [ -0.020442952219356499, 60, -1000, 120000, ], [ 0.015130843902343399, 24, -250, 5000, ], [ 0.017929869399484, 24.99, -250, 5000, ], [ 0.016581855, 24.5, -250, 5000, ], [ 0.016550119066711999, 24, -250, 5000, null, 1, ], [ 0.087499997684093694, 208, -700, 8000, ], [ 0.087113755605863596, 10, -1000, 6500, ], [ 0.048472127283572801, 6, -1000, 100000, -126068, ], [ 0.030272873827543501, 6, 1000, 100000, -126068, ], [ 0.030272873827543699, 6, -1000, -100000, 126068, 0, ], [ '#NUM!', 0, 1, 8000, ], [ '#NUM!', 208, -700, 8000, 0, 0, 0, ], [ -1.000125, // Excel says #NUM!, but I believe this is correct 1, 1, 8000, ], [ 6.9258100553578E-10, 208, -700, 137600, 8000, ], [ 0.00054607632544395, 208, -700, 137600, ], [ '#VALUE!', 'NaN', -700, 8000, 0, 0, 0, ], [ '#VALUE!', 208, 'NaN', 8000, 0, 0, 0, ], [ '#VALUE!', 208, -700, 'NaN', 0, 0, 0, ], [ '#VALUE!', 208, -700, 8000, 'NaN', 0, 0, ], [ '#VALUE!', 208, -700, 8000, 0, 'NaN', 0, ], [ '#VALUE!', 208, -700, 8000, 0, 0, 'NaN', ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/Financial/RRI.php
tests/data/Calculation/Financial/RRI.php
<?php declare(strict_types=1); return [ [ 0.04137974399241062, [10, 10000, 15000], ], [ 0.00099330737629133, [96, 10000, 11000], ], [ 0.6747967875721199, [10, 70, 12154], ], [ '#VALUE!', ['NaN', 70, 12154], ], [ '#VALUE!', [10, 'NaN', 12154], ], [ '#VALUE!', [10, 70, 'NaN'], ], [ '#NUM!', [0.0, 70.0, 200.0], ], [ '#NUM!', [10, 0.0, 200.0], ], [ '#NUM!', [10, 70, -2.0], ], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/DateTime/DAYOpenOffice.php
tests/data/Calculation/DateTime/DAYOpenOffice.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; // OpenOffice Result, Argument return [ [19, 22269], [1, 30348], [10, 30843], [11, '11-Nov-1918'], [28, '28-Feb-1904'], [ExcelError::VALUE(), '30-Feb-1904'], [ExcelError::VALUE(), 'Invalid'], // The following will all differ between Excel and OpenOffice [29, -1], [31, 1], [30, 0.5], [30, 0], [31, true], [30, false], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/DateTime/DATEDIF.php
tests/data/Calculation/DateTime/DATEDIF.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [365, '2016-01-01', '2016-12-31', 'YD'], [364, '2015-01-01', '2015-12-31', 'YD'], [364, '2015-01-01', '2016-12-31', 'YD'], [365, '2016-01-01', '2017-12-31', 'YD'], [364, '2017-01-01', '2018-12-31', 'YD'], [ExcelError::VALUE(), 'ABC', '2007-1-10', 'Y'], [ExcelError::VALUE(), '2007-1-1', 'DEF', 'Y'], [ExcelError::VALUE(), '2007-1-1', '2007-1-10', 'XYZ'], [ExcelError::NAN(), '2007-1-10', '2007-1-1', 'Y'], [0, '2007-12-31', '2008-1-10', 'Y'], [0, '2007-1-1', '2007-1-10', 'Y'], [0, '2007-1-1', '2007-1-10', 'M'], [9, '2007-1-1', '2007-1-10', 'D'], [0, '2007-1-1', '2007-1-10', 'YM'], [9, '2007-1-1', '2007-1-10', 'YD'], [9, '2007-1-1', '2007-1-10', 'MD'], [0, '2007-1-1', '2007-12-31', 'Y'], [11, '2007-1-1', '2007-12-31', 'M'], [364, '2007-1-1', '2007-12-31', 'D'], [11, '2007-1-1', '2007-12-31', 'YM'], [364, '2007-1-1', '2007-12-31', 'YD'], [30, '2007-1-1', '2007-12-31', 'MD'], [1, '2007-1-1', '2008-7-1', 'Y'], [18, '2007-1-1', '2008-7-1', 'M'], [547, '2007-1-1', '2008-7-1', 'D'], [6, '2007-1-1', '2008-7-1', 'YM'], [181, '2007-1-1', '2008-7-1', 'YD'], [0, '2007-1-1', '2008-7-1', 'MD'], [0, '2007-1-1', '2007-1-31', 'Y'], [0, '2007-1-1', '2007-1-31', 'M'], [30, '2007-1-1', '2007-1-31', 'D'], [0, '2007-1-1', '2007-1-31', 'YM'], [30, '2007-1-1', '2007-1-31', 'YD'], [30, '2007-1-1', '2007-1-31', 'MD'], [0, '2007-1-1', '2007-2-1', 'Y'], [1, '2007-1-1', '2007-2-1', 'M'], [31, '2007-1-1', '2007-2-1', 'D'], [1, '2007-1-1', '2007-2-1', 'YM'], [31, '2007-1-1', '2007-2-1', 'YD'], [0, '2007-1-1', '2007-2-1', 'MD'], [0, '2007-1-1', '2007-2-28', 'Y'], [1, '2007-1-1', '2007-2-28', 'M'], [58, '2007-1-1', '2007-2-28', 'D'], [1, '2007-1-1', '2007-2-28', 'YM'], [58, '2007-1-1', '2007-2-28', 'YD'], [27, '2007-1-1', '2007-2-28', 'MD'], [0, '2007-1-31', '2007-2-1', 'Y'], [0, '2007-1-31', '2007-2-1', 'M'], [1, '2007-1-31', '2007-2-1', 'D'], [0, '2007-1-31', '2007-2-1', 'YM'], [1, '2007-1-31', '2007-2-1', 'YD'], [1, '2007-1-31', '2007-2-1', 'MD'], [0, '2007-1-31', '2007-3-1', 'Y'], [1, '2007-1-31', '2007-3-1', 'M'], [29, '2007-1-31', '2007-3-1', 'D'], [1, '2007-1-31', '2007-3-1', 'YM'], [29, '2007-1-31', '2007-3-1', 'YD'], [-2, '2007-1-31', '2007-3-1', 'MD'], [0, '2007-1-31', '2007-3-31', 'Y'], [2, '2007-1-31', '2007-3-31', 'M'], [59, '2007-1-31', '2007-3-31', 'D'], [2, '2007-1-31', '2007-3-31', 'YM'], [59, '2007-1-31', '2007-3-31', 'YD'], [0, '2007-1-31', '2007-3-31', 'MD'], [0, '2008-1-1', '2008-9-1', 'Y'], [8, '2008-1-1', '2008-9-1', 'M'], [244, '2008-1-1', '2008-9-1', 'D'], [8, '2008-1-1', '2008-9-1', 'YM'], [244, '2008-1-1', '2008-9-1', 'YD'], [0, '2008-1-1', '2008-9-1', 'MD'], [1, '2007-2-1', '2008-4-1', 'Y'], [14, '2007-2-1', '2008-4-1', 'M'], [425, '2007-2-1', '2008-4-1', 'D'], [2, '2007-2-1', '2008-4-1', 'YM'], [59, '2007-2-1', '2008-4-1', 'YD'], [0, '2007-2-1', '2008-4-1', 'MD'], [47, '1960-12-19', '2008-6-28', 'Y'], [570, '1960-12-19', '2008-6-28', 'M'], [17358, '1960-12-19', '2008-6-28', 'D'], [6, '1960-12-19', '2008-6-28', 'YM'], [191, '1960-12-19', '2008-6-28', 'YD'], [9, '1960-12-19', '2008-6-28', 'MD'], [25, '1982-12-7', '2008-6-28', 'Y'], [306, '1982-12-7', '2008-6-28', 'M'], [9335, '1982-12-7', '2008-6-28', 'D'], [6, '1982-12-7', '2008-6-28', 'YM'], [203, '1982-12-7', '2008-6-28', 'YD'], [21, '1982-12-7', '2008-6-28', 'MD'], [2, '2007-12-25', '2010-3-17', 'Y'], [26, '2007-12-25', '2010-3-17', 'M'], [813, '2007-12-25', '2010-3-17', 'D'], [2, '2007-12-25', '2010-3-17', 'YM'], [82, '2007-12-25', '2010-3-17', 'YD'], [20, '2007-12-25', '2010-3-17', 'MD'], [51, '19-12-1960', '26-01-2012', 'Y'], [613, '19-12-1960', '26-01-2012', 'M'], [18665, '19-12-1960', '26-01-2012', 'D'], [1, '19-12-1960', '26-01-2012', 'YM'], [11, '19-12-1960', '26-11-1962', 'YM'], [38, '19-12-1960', '26-01-2012', 'YD'], [7, '19-12-1960', '26-01-2012', 'MD'], [0, '19-12-1960', '12-12-1961', 'Y'], [1, '19-12-1960', '12-12-1962', 'Y'], [51, '19-12-1960', '12-12-2012', 'Y'], [0, '1982-12-07', '1982-12-7', 'D'], [244, '2008-1-1', '2008-9-1'], // default unit is D ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/DateTime/TIME.php
tests/data/Calculation/DateTime/TIME.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [0.757766203704, 18, 11, 11], [0.260474537037, 6, 15, 5], [0.520949074074, 12, 30, 10], [0.781539351852, 18, 45, 25], [0.647800925926, 15, 32, 50], [0.458321759259, 11, false, -1], [0.584780092593, 13, 62, 5], // Minutes > 60 [0.550868055556, 13, 12, 75], // Seconds > 60 [0.319641203704, 9, -80, 17], [ExcelError::NAN(), 2, -120, -1], [1.1574074E-5, 2, -120, 1], [0.500717592593, 36, true, 2], [ExcelError::NAN(), -1, 2, 3], [0.001030092593, -1, 61, 29], [0.0, -1, 61, -60], [ExcelError::VALUE(), 'A', 21, 22], [0.499305555556, 11, 59, 0], [0.5, 12, 0, 0], [0.700115740741, 16, 48, 10], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false
PHPOffice/PhpSpreadsheet
https://github.com/PHPOffice/PhpSpreadsheet/blob/e33834b4ea2a02088becbb41fb8954d915b46b12/tests/data/Calculation/DateTime/SECOND.php
tests/data/Calculation/DateTime/SECOND.php
<?php declare(strict_types=1); use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; return [ [57, 0.2339930556], [13, 0.4202893519], [22, 0.60789351845], [11, 0.8022106481], [35, '11-Nov-1918 11:15:35'], [0, '11:59 PM'], [59, '23:59:59'], [0, 3600], [ExcelError::VALUE(), '23:59:99'], [ExcelError::NAN(), -3601], [0, 12500], [0, 65535], [ExcelError::VALUE(), "Half past 1 O'Clock"], [0, false], [0, true], ];
php
MIT
e33834b4ea2a02088becbb41fb8954d915b46b12
2026-01-04T15:02:44.305364Z
false