Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #362: Capital Gains Tax when Selling a Home

AYXAcademy
Alteryx
Alteryx

A solution to last week’s challenge can be found here. 

To solve this week’s challenge, use Designer Desktop or Designer Cloud Trifacta Classic. House_taxes.jpg
 

If you are currently selling your home, you may not be happy to learn that capital gains (profit from the sale of the home) are taxable in the United States. One way to reduce the amount of capital gains taxes you pay is to use deductions.  

 

For this challenge, we will use two possible deductions, the Exclusion of Gain (you may qualify to exclude up to $250,000 of the capital gain from your income as a single filer, or up to $500,000 of that gain if you file a joint return with your spouse); and Capital Improvements (when home sale profits exceed the exclusion of gain threshold, consider deducting any capital improvements you made to the home while you owned it). 

 

Your challenge is to answer two questions: 

  1. Identify which home sellers will have to pay taxes on the profit made from the sale of their home. 
  2. Determine how much those sellers have to pay. 

Use the information below to calculate and determine who should pay taxes. 

DISCLAIMER: This challenge is meant for educational purposes only and is not intended to be construed as financial, tax, or legal advice. 

benjimoser
9 - Comet

My Solution. But would the "overage" not only be the part of the "capital gain" which is above the "exclusion of gains" value?

Spoiler
benjimoser_0-1678719474248.png

 

 

mmontgomery
11 - Bolide
11 - Bolide

Watch that overage!

Spoiler
mmontgomery_0-1678719979271.png

 

Flo_P
9 - Comet
Spoiler
Includes the automatic transformation of the tax rates input
Flo_P_0-1678720351976.png

 

Luke_C
17 - Castor
17 - Castor

I don't think the gain exclusion is included in the solution (though speaking as a CPA there's not enough information to say if it technically should be 😂). 

 

Spoiler
Luke_C_1-1678720803511.png

 

Kenda
16 - Nebula
16 - Nebula
Spoiler
Kenda_0-1678721270372.png

 

Kenda
16 - Nebula
16 - Nebula

@Luke_C I thought the same thing at first after reading just the directions. If you look at the image included in the workflow, though, it suggests a bit of a different calculation. 

acarter881
12 - Quasar

Here's my solution. I tested my multi-row formula that allocates the percentage to pay with varying amounts. I believe that isn't the intention of the challenge, but it is a bit more dynamic as a result.

Spoiler
acarter881_0-1678726483086.png

 

dougbaron
8 - Asteroid
Spoiler
dougbaron_0-1678726628703.png

 

samihamaipady
7 - Meteor

My Answer