Unmodified stats have a stage of 0, & they can go as low as -6, & as high as +6. Drops below 0 typically have diminishing returns, with -6 being only 25% of the unmodified/base value 0 has.
For every stage above 0, it adds 50% of base.
So if a Pokemon has like, 420 ATK, at a stat stage of 0, Swords Dance puts it at +2, & since that's 2 stages above 0, it adds 2 instances of 50% of base; Or 100% of base. 420 + 50% of 420 + 50% of 420 = 2 * 420, or 840.
So it does technically double there.
But a second Swords Dance wouldn't double the "840", because that 2nd Swords Dance is just another 2 stages, each of which is 50% of base.
A Pokemon with 3 Swords Dance doesn't go x2, x4, x8, it goes x2, x3, x4.
Because indeed, a Pokemon with +6 in any stat will have quadruple the base value, because 6 additions of 50% of the base value added to the base value (All 6 add 50% of the original 100% that's still there, so it's 100% + 300%.) equals 400%.
Sorry if that's a bit confusing or unnecessary.