After a season of toil and struggle, you finally did it: you finished with the worst record in the NBA. Visions of the No. 1 pick, the glittering crown jewel of the draft class, dominate your thoughts.

But will that pick actually be yours? The answer very much depends on when your team occupies pro basketball’s basement. (Yes, there are a lot of unsold Andrea Bargnani jerseys down here. Take one! Take four if you want!)

1947-48: 100 percent

Congratulations! These are the only two seasons in NBA (OK, technically it was the BAA back then) where having the worst record absolutely, without limitation, guaranteed you the first pick in the draft. You did it!

1949-65: 100 percent*

The lottery hadn’t been instituted yet, and draft picks were assigned in reverse order of record. But there was one catch: territorial picks, which allowed any team to forfeit its first-round pick, no matter where it was in the order, to claim any player within a 50-mile radius of the team’s home arena. That rule allowed Philadelphia to give up the third pick to claim Wilt Chamberlain in the 1959 Draft; the Lakers used a territorial pick in 1962 on Gail Goodrich even though they had the second-best record in the league.

The NBA didn’t count those territorial picks within the draft order, though, so I guess you can take some comfort that you still technically have the first pick even if the player you wanted isn’t there? Yeah, you’re right. Not all that comforting.

1966-84: 50 percent

For nearly two decades, the NBA’s lottery system was extremely simple: you took the worst team from the East and the worst team from the West, and flipped a coin to decide which one of them got the first pick. (Loser got the second pick). Those coin flips were what made Bill Walton a Blazer instead of a Sixer, Ralph Sampson a Rocket instead of a Pacer, and Magic Johnson a Laker instead of a Bull.

The worst team in the league won the coin flip in 10 of these 19 seasons. This was a reasonably fair way to award the first pick, though it lacked the drama of some almost-good enough-for-the-playoffs team leapfrogging to the top. Worst case, you’re still in position to draft a really good player.

1985-1988: 14.2 percent

Worried that the coin flip approach pushed franchises to tank hard, the NBA adopted a lottery system where every team that missed the playoffs had an equal chance of winning the first-overall pick. At the time they implemented this system, only seven teams had a shot at winning the lottery.

The 1988 Clippers were the only franchise to win the first pick with the worst record under this system. The 1985 Knicks had the third-worst record the year before when they won the right to draft Patrick Ewing.