Questions on sexual orientation and gender will be included in the census, after the Albanese government backflipped on its decision to omit the proposed change.
Treasurer Jim Chalmers announced on Sunday the new topics would be included in the next national snapshot to be held in 2026, following backlash from the LGBTIQ+ community.
The Australian Bureau of Statistics will write the questions.
Dr Chalmers said LGBTIQ+ Australians had been heard.
"We've had good intentions right throughout this, we want to do the right thing for the right reasons," he said.
"We've listened, we've taken that feedback seriously.
"We're going to get the right outcome here, which is really important, and we will continue to work with the community and with the ABS through the next stages of the process."
Previously, the government was of the view the proposed questions might be too complex and could spark a damaging culture war in the lead-up to the federal election, due by the end of May.
Equality Australia CEO Anna Brown applauded the decision, saying it was time LBGTIQ+ people were included.
"Access to this data will be transformative for Australia and the lives of LGBTQ+ people and our families," she told reporters in Sydney on Sunday.
"The government will know where we live, where we need to access health services, where we're employed and what our families look like."
It was disappointing that a question on intersex people wouldn't be included but Ms Brown agreed more work needed to be done to ensure the census collected the right data.
Assistant Treasury Minister Andrew Leigh said the questions would be asked of people aged 16 and over and answering would be optional.
"The ABS did not recommend a topic on variations of sex characteristics (intersex status) in the census, and it will not be included," he added.
"We value every Australian, regardless of their faith, race, gender or LGBTIQ+ status."
The government plans to settle the changes before the end of the year.