Why is my Australian GST calculation incorrect on invoices?

Any advice would be greatly appreciated.

I have my products set to include Taxes (Australian GST). On my invoice template coding we have set the GST to self calculate the GST amount to be 10% of the total figure, for eg $240 should be $24, but it’s not and the coding seems correct(se below). The GST calculated is always less but no sign of a trend or certain %. My tax rate is set to Australia

our coding for gst caluclation"

{% assign gst = subtotal_price | times: 10 | divided_by: 100 %}
{% assign sub_total_before_gst = subtotal_price | minus: gst %}