The bill also supports use of the International Space Station through 2024.
Experts say sending people to live on Mars, 225mn kilometers away, would require immense technological and financial resources.
Donald Trump plans to send people to Mars
Who said what
Praise for Trump's NASA bill from several quarters
President Donald Trump hailed the bill as a job creator. "This bill also calls for ongoing medical monitoring and treatment of our astronauts," he added.
Senator Marco Rubio said the law will promote innovation and improve collaboration between NASA and commercial space sector, including other benefits.
NASA Acting Administrator Robert Lightfoot said the support will help NASA retain leadership in exploration and scientific achievement.
28 Sep 2016
NASA might join SpaceX, Boeing league
In September, SpaceX announced the Interplanetary Transport System for the project.
Next month, Boeing unveiled its Space Launch System. CEO Dennis Muilenburg said he was convinced the first person on Mars would arrive there on a Boeing.
Love World news?
Stay updated with the latest happenings.
Challenges to the Mars colonisation plans
Getting people to the Red Planet is going to be difficult, but keeping them alive there would be another challenge.
Even if one landing occurs without problems, reliably successful repetition of the project is doubtful.
Costs of settlement would be huge, and whether private companies like SpaceX and Boeing being able to fund it is unlikely.