Editors' pick: Originally published Sept. 14.

Sending your kids to summer camp is much like handing your best friend your wallet and putting her on a plane to Vegas. 

She's going to have a blast, and odds are good that you'll be broke. 

But what's a working parent to do in the summer? You have no choice but to pony up tons of cash for the day camp du jour so you can spend the day in the office. Of course, as the school year gets underway and memories of camp fade, don't forget: Uncle Sam actually has some empathy for you and offers a tax credit, called the child and dependent care credit, so that you can get back some of the camp money you've spent. 

Naturally, as is typical with the IRS code, there are stipulations. Both parents have to work. If one parent stays home with kids and you still decide to send them to day camp, you won't qualify for this credit, says Lisa Greene-Lewis CPA, communications manager & tax expert at Intuit. (Much like if your friend poured everything you gave her down a slot machine and lost.)

So presuming you both work, or you're a single parent who works, you can try to recoup some of those childcare costs. 

Because that's what they are really. Sure, Junior is having fun, going on field trips and playing in the sprinklers all day, but all that entertaining is really so you can get to work and, well, pay for that darn camp.

So let's walk through this.

    Your Child Must Be Under 13 and Your Dependent.

    Your kid has to be under 13 for the whole calendar year. So if she turns 13 next month, you're out, says Fred Slater, CPA & partner at MS1040 LLC in New York City.

    Of course, if your child is mentally or physically disabled, there's no age limit. 

    She has to be your dependent - that means you are the main caretaker - and you declare her as a dependent on your tax return. 

    You also must have earned income. So if you're a trader who lives off interest and dividends, you can't take this credit. (I know, blame the slot machines.)

      You Can Deduct Any Day Camp, But Not Sleepaway Camp or Tutors.

      So start tallying the costs of all the day camps your kids attended this summer. That includes sports, science, computer camps, etc., says Slater. 

      TST Recommends

      But it must be a day camp. Sleepaway camp doesn't count. The IRS doesn't seem to think you send your kid to a sleepaway camp to work. (We never said Uncle Sam was logical.) 

      And while you're tallying camp costs, be sure to include all the stuff you paid throughout the year to have someone watch your kid while you worked. That includes babysitting fees (as long as your teenager under 19 wasn't the sitter) or after-school care, says Greene-Lewis. And again that "after-school care" can be a soccer clinic or dance classes right after school -- anything you pay for to keep your little one occupied while you work hard to pay those bills.

      Unfortunately, tutoring doesn't count. The IRS sees that as an extension of school. (Again, don't ask.)

        You Can Put Up to $1,200 Back in Your Pocket.

        Since every penny counts these days, let's all try to get the full amount.

        Once you tally everything, the maximum amount of expenses you're allowed to use to calculate the credit is:

        • $3,000 for one qualifying child
        • $6,000 for two or more qualifying persons (So it doesn't matter, if you have four kids in camp, says Slater. You do not get $3,000 per kid.)

        The credit is 20% to 35% of those qualified expenses. The percentage depends on your adjusted gross income (AGI), so for more detail click here. But in 2016, if your AGI was $43,000 or more, you applied 20% to your total.

        So if you make more than $43,000 and are paying at least $6,000 a year for your kids' childcare, the maximum credit is $1,200 ($6,000 x 20%). But that's $1,200 that goes right into your pocket. (Finally, you got a few coins back from the slots.) 

          Get the Camp's Tax Info.

          You will need to complete Form 2441: Child and Dependent Care Expenses and attach it to your Form 1040 to claim the credit.

          All your expenses will go on the form as well as the camp or daycare's Employer Identification Number (EIN), full name and address.

          Big Note: Your W-2, Box 10 will show the amount of child and dependent care benefits your employer paid during the year. But you can't use them as part of your credit. So be sure to subtract them from your total or just leave them out.

          We all love our kids, but some days, it feels like it actually would be cheaper to go to Vegas!

          For more tax tips, check out TheStreet's Tax Center