# Ruby tax calculation algorithm/program for federal and state

**URL:** <https://www.ruby-forum.com/t/ruby-tax-calculation-algorithm-program-for-federal-and-state/105003>\
**Category:** Ruby\
**Created:** [May 24, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/ruby-tax-calculation-algorithm-program-for-federal-and-state/105003 "2007-05-24T21:01:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rubyman](https://www.ruby-forum.com/u/rubyman)\
**Post date:** [May 24, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/ruby-tax-calculation-algorithm-program-for-federal-and-state/105003/1 "2007-05-24T21:01:06Z")

</div>

Hello,

I was wondering if someone could point me in the right direction as  
regards  
Federal and State income tax calculation. I would like to be able to do  
this  
without storing the entire tax table(s), but rather calculate the tax  
using  
each state’s tax rate scheule (or the Federal tax rate scheulde if  
calculating federal income tax) - the number of brackets, filing status  
if  
applicable, the rates, etc., so the method would receive the taxable  
amount  
and the state (or federal) in question along with filing status and  
would  
return the tax amount.

Thanks,

Harry T.

---

<div class="post-metadata">

**Author:** ![rubyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rubyman](https://www.ruby-forum.com/u/rubyman)\
**Post date:** [May 24, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/ruby-tax-calculation-algorithm-program-for-federal-and-state/105003/2 "2007-05-24T21:31:14Z")

</div>

Harry T. wrote:

> Thanks,
> 
> Harry T.

[http://opentaxsolver.sourceforge.net/](http://opentaxsolver.sourceforge.net/) may be of interest

---

<div class="post-metadata">

**Author:** ![rubyman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rubyman](https://www.ruby-forum.com/u/rubyman)\
**Post date:** [May 25, 2007, 12:42pm UTC](https://www.ruby-forum.com/t/ruby-tax-calculation-algorithm-program-for-federal-and-state/105003/3 "2007-05-25T12:42:23Z")

</div>

On Fri, 25 May 2007 03:59:54 +0900, “Harry T.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) said:

> if  
> applicable, the rates, etc., so the method would receive the taxable  
> amount  
> and the state (or federal) in question along with filing status and would  
> return the tax amount.

I had the… pleasure… of doing this for Federal and Oregon income  
taxes. For both the instruction booklets should give you most everything  
you need. If the actual rates and brackets aren’t there, they’ll be on  
the IRS’s site and whatever state department of revenue you’re working  
with.

Just how accurate are you trying to be?

-Dane
