Home Depot is awarding its hourly employees in the U.S. a one-time cash bonus of as much as $1,000 following the passage of new tax legislation.

The bonus amounts will be determined based on a person's length of service, similar to Walmart's strategy. All of Home Depot's U.S. hourly workers will get at least a $200 bonus, a spokeswoman told CNBC, and the maximum payout is $1,000 for workers who've served at least 20 years.

The sliding scale looks like this, a Home Depot employee said after attending a company meeting regarding the news:

Less than 2 years: $200 bonus

2 to 4 years: $250 bonus

5 to 9 years: $300 bonus

10 to 14 years: $400 bonus

15 to 19 years: $750 bonus

20+ years: $1,000 bonus

Home Depot declined to comment on these amounts.

Home Depot joins a growing list of corporations, and many retailers, using new tax benefits to invest in their workers.

"This incremental investment in our associates was made possible by the new tax reform bill," Chief Executive Officer Craig Menear said in prepared remarks. "We are pleased to be able to provide this additional reward to our associates."

The home improvement retailer said the new tax law will result in added tax expenses of about $150 million in the fourth quarter, which are tied to taxes on offshore earnings. These expenses and the bonus payments will lower Home Depot's fiscal 2017 earnings by 19 cents a share, the company said.

For fiscal 2018, Home Depot is still evaluating the legislation's impact on its business but said it should be "beneficial."

"Amid the changing retail environment," Home Depot said it plans to make more investments in its stores, workers and the customer shopping experience.

More companies, and especially retailers, face heightened pressure today to recruit the best talent as the U.S. labor market continues to tighten. Bonus payments, wage increases and other benefits can help incentivize current employees to stick around.

Home Depot will provide more details on future investments when it reports fourth-quarter earnings on Feb. 20.