also, worthwhile to read the ATO webpage that Islandmurray included in his above post, it provides similar explanation but includes a couple of worked examples.
Week 44 Wrap: Relatively boring week ahead of US election; HotCopper's most watched; Oz inflation at 3.5%