Exclusive

Kodak Black can start marking the days off his calendar -- if that's allowed in federal prison -- because we've just learned when he'll be released.

Kodak will be free again on or about Aug. 14, 2022 -- according to the feds. He could get out a few days earlier because the 14th falls on a Sunday. It's federal policy to let inmates out early if their release date falls on a weekend.

The rapper also knows the Bluegrass State will apparently be his home until then. Kodak's currently being transferred to a federal prison in Oklahoma City -- a temporary stop before one more transfer. His attorney says he'll end up in a federal pen in Kentucky.

Kodak is serving 46 months for a gun possession case, and has spent the first chunk of his sentence in a Miami federal pen.

As you know ... he claims FCI Miami was a living hell, and he's blaming correctional officers for much of his alleged misfortunes. He's made a point to speak out about his alleged mistreatment in social media posts, claiming he was drugged, beaten and denied food and other privileges.

Kodak's mom just hired powerhouse attorney Benjamin Crump, who repped Trayvon Martin's family in the George Zimmerman case as well as Devon Jacob and Sue-Ann Robinson. The rapper's mom is threatening to sue the Bureau of Prisons.

Despite Kodak's beef with FCI Miami, sources familiar with the situation believe he was transferred to another prison because it's standard ops.