Walmart announced on Thursday its plans to give out bonuses of up to $1,000 to some of its employees, following the passage of new tax legislation that slashes corporate tax rates.

However, the amount each hourly worker receives will depend on his or her time with the company. (See a chart below for details.)

In total, the big-box retailer and largest private employer in the U.S. will spend $400 million in fiscal 2018 to fund the one-time pay outs. Walmart said an employee's qualification for a bonus will be determined before the end of the month, "and payments will be paid as quickly as practical thereafter."

Here's a breakdown of what employees should expect to receive:

More than 20 years of service: $1,000 15 to 19 years of service: $750 10 to 14 years of service: $400 5 to 9 years of service: $300 2 to 4 years of service: $250 Less than 2 years of service: $200

Also on Thursday, Walmart revealed it would be shuttering 63 of its Sam's Club wholesale stores across the country. Some of the stores would close immediately.

The company said those workers impacted by the closures would still be eligible for bonuses.

While many employees, customers and analysts alike were startled by the abrupt store closure news, Walmart has largely been applauded for opting to give back a portion of its tax savings to workers.

"Providing employees with a bonus and better wages should also help drive additional sales, and also allow the company to remain competitive in a 17-year-low unemployment rate labor market," Susquehana analyst Bill Dreher wrote in a note to clients.

"This represents less than 20% of Walmart's tax savings which we expect will be invested in merchandise price reductions, employee training, omnichannel and other technology investments as well as share repurchases," Dreher said.