Bifalgorithm post · Computer science one · Life & Taxes

How is the child tax credit calculated and limited by total tax liability?

How is the child tax credit calculated and limited by total tax liability? (Computer science one · Life & Taxes) — "Next we compute the child tax credit, takin…

Ideas in this flowchart

  • Compute the child tax credit and apply it to the total tax liability.
  • The child tax credit must not exceed $3,000.
  • Determine the credit from the number of children.
  • Is numChildren less than or equal to 3?
  • Set credit to numChildren multiplied by 1000.
  • Set credit to $3,000.
  • Is the credit greater than the total tax liability?
  • Set the tax to zero rather than allowing a negative tax.
  • Apply the credit without exceeding the total tax liability.
Feed/

How is the child tax credit calculated and limited by total tax liability?

No cover

Channel

Computer science one

1 page

"Next we compute the child tax credit, taking care that it does not exceed $3,000. A conditional based on the number of children suffices as at this point in the program we already know it is zero or greater.\n\n1 if(numChildren <= 3) {\n\n2 credit = numChildren * 1000;\n\n3 } else {\n\n4 credit = 3000;\n\n5 }\n\nFinally, we need to ensure that the credit does not exceed the total tax liability (the credit is non-refundable, so if the credit is greater, the tax should only be zero, not negative)."

Flowchart preview
👍
0
0 comments0 shares

Sign in to view and post comments.