Five 3" shells is 15", and then you have to allow for the spring.
I'd think a 24" barrel would support at most a 6 round magazine. After that you have to start lengthing the barrel in 3" increments for every additional round.
Again, 2 3/4” is the standard size for a 12ga to chamber, not 3”.