
NASA spent around $25 billion a calendar year in the early 1970s. This was roughly $170 trillion today. NASA's percentage of the federal government budget dropped from 4.5 percent down to less that one percent between 1969-1986.
NASA and US Department of Defense collaborated in thousands of research activities during this time. NASA's research in certain areas was not military-focused. Instead, they exchanged information on areas of mutual interests. NASA was mainly focused on aeronautics and robotics research. NASA sometimes subsidized military research and reimbursed the Air Force for special requirements specific to the flight project.
NASA's part of the federal budget rose slightly during the 1990s. However, that amount decreased again during the Bush administration. After that, NASA's portion of the federal budget has steadily declined. In the last few years, NASA's budget has never exceeded two percent of the federal budget.
US has a $600 Billion military budget. This is in addition to its NASA budget. This is more than any other country's budget for military operations. NASA's budget only represents 4 percent of the total military budget. This leaves NASA with only a fraction of the money that is available for space exploration.

NASA's ability to fund a Mars base is still a question. NASA currently estimates that landing humans on Mars will cost $450Billion. NASA would be able afford to send a crewed mission to the moon if it had the military budget.