grattan icon indicating copy to clipboard operation
grattan copied to clipboard

medicare_levy appears to be giving wrong result in 2015-16

Open thmcmahon opened this issue 8 years ago • 10 comments

So grattan::medicare_levy(24000, fy.year = '2015-16', Spouse_income = 28000, n_dependants = 3, family_status = 'family') returns 0, but according to the ATO calculator it should be $219.75.

thmcmahon avatar Feb 14 '17 23:02 thmcmahon

Well, somethings awry. But I get $67.16. https://www.ato.gov.au/Calculators-and-tools/Medicare-levy/

HughParsonage avatar Feb 15 '17 00:02 HughParsonage

Ah yeah just redid the medicare calculator and I get $67.16 too - don't know where I got $219.75 from.

thmcmahon avatar Feb 15 '17 01:02 thmcmahon

So currently medicare_levy(X, Spouse_income = Y) != medicare_levy(Y, Spouse_income = X). I'm trying to figure out whether this condition is contrary to the intention of the Act.

With medicare_levy(26000, fy.year = '2015-16', Spouse_income = 26000, n_dependants = 3, family_status = 'family') / 2 I get $64.50.

HughParsonage avatar Feb 15 '17 01:02 HughParsonage

I'll apply a fix to that which I know is wrong, but I stand by the current calculation method. It's possible the ATO calculator is wrong, but I've written to ask why.

The discrepancy lies in the reduction due to dependants. The spouse income calculation agrees with the calculator.

HughParsonage avatar Feb 15 '17 04:02 HughParsonage

medicare_levy(X, Spouse_income = Y) != medicare_levy(Y, Spouse_income = X) is correct because where they're different they have a different proportion of the shading. The master tax guide has an explanation of how this is meant to work.

thmcmahon avatar Feb 15 '17 04:02 thmcmahon

Thanks. I don't have a copy of the Guide. I'd be super grateful if you discover why my formula is wrong.

HughParsonage avatar Feb 15 '17 04:02 HughParsonage

medicare_levy on the dev branch (1b13a4bf3bc76163ee17a81c9e14242edbbb5602) currently agrees with the Masters Guide examples, but now collides with existing unit tests (notably those incorporating SAPTO). It's possible I've got the wrong thresholds and lower_up_for_each_child units.

HughParsonage avatar Feb 15 '17 12:02 HughParsonage

The 2015-16 Budget Paper No. 2 (p. 26 print, p. 42 PDF) says the family threshold for 2015-16 should be 35,261 and the child should be 3238, but the ATO says the threshold is 36,000 (try incomes of $18,000 and $18,000, no children).

So it seems the ATO calculator is wrong and not all the unit tests I wrote (using this calculator) can be relied upon.

HughParsonage avatar Feb 18 '17 08:02 HughParsonage

Great. That's annoying. I might ask the PBO whether they have a canonical source of inputs and outputs to write unit tests against.

thmcmahon avatar Feb 19 '17 23:02 thmcmahon

That'd be swell. You might get more joy.

On Mon, 20 Feb 2017 at 10:09 am, Thomas McMahon [email protected] wrote:

Great. That's annoying. I might ask the PBO whether they have a canonical source of inputs and outputs to write unit tests against.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/HughParsonage/grattan/issues/50#issuecomment-280957820, or mute the thread https://github.com/notifications/unsubscribe-auth/AHvGDDzE_bELBsrDITGbEyiXcnoZxmlsks5reMvDgaJpZM4MBHkr .

HughParsonage avatar Feb 19 '17 23:02 HughParsonage