Coming close only counts in horseshoes and hand grenades.
That pretty much sums up my view on whether teams should take partial credit on nearly finished stories when calculating velocity. In this article, though, I do want to address some of the reasons why.
Typically, a team wants partial credit when they've reached the end of the sprint and feel they've done "most" but not all of a given user story. They'll often claim they are something like 80 or 90 percent done and should therefore get some of the credit for the story.
A team will only try this if the points are significant enough to be worth arguing about. No team is going to say, "We finished 90 percent of this one-point story. We demand 0.9 be counted toward velocity."
Instead, they make the argument on big stories--perhaps eight, 13 or even 20 pointers, depending on what is significant relative to the team's velocity. In many cases, these stories were probably too big to have come into the sprint without first being split into smaller pieces, and that is a large part of why the story wasn't finished within the sprint.
When a Scrum Master takes a no-partial-credit stance in cases like this, it often pisses off the team. Sometimes this makes them take a we'll-show-you attitude toward the Scrum Master. They then proceed to show the Scrum Master how stupid the rule is by always finishing stories.
And, to ensure they always finish, they split stories up before starting them. Each of these is something a Scrum Master would want the team to do! So, by enforcing a strict no-partial-credit rule, a first benefit is that teams often respond by splitting stories further and by trying harder to finish everything in a sprint.
One of the big problems with partial credit is that teams will usually overstate their amount or progress. They may claim to be 90 percent done when only 70 percent done. Of course, we can't truly know how far done they are, but overstating progress is common in my experience.
Overstating progress feels good. The team is, after all, able to report a higher velocity. Unfortunately this won't feel good for long. As soon as someone divides the work remaining by the team's average velocity--which is now overstated--the result will be an artificially early prediction of when the work will be completed.
So, do I ever let a team take partial credit?
Yes, I do. If a team discovers sufficiently early in a sprint that they will not finish and splits the story, I will let them count the part they finish. But they need to do this early enough that it isn't cheating. A team attempting to split a story 90 percent/10 percent on the last day is merely trying to circumvent the no-partial-credit rule.
A general guideline is that the story should be split early enough that no part of it is already done. If you're a Scrum Master, encourage your team to be honest with themselves--they'll know if they're cheating.