LWN.net Logo

OpenTaxSolver solves taxes, openly

March 17, 2010

This article was contributed by Nathan Willis

OpenTaxSolver (OTS) takes on one of open source software's long-standing criticisms: the lack of a simple-to-use tax return preparation application on the level of TaxCut or TurboTax. Although OTS does not feature the step-by-step, question-driven interface popular in the proprietary products, it includes an optional graphical front-end, and enables the user to systematically fill out the most popular US federal income tax forms: 1040, Schedules A,B, C, and D, and eight US state income tax returns.

Over the years there have been several other open source tax preparation projects, but most tend to produce working solutions for only a few years, then fall out of maintainership or disappear altogether. Because the income tax code changes every year, the math and the interface must change every year — in unpredictable and sometimes complicated ways. Consequently, the fact that OTS has been making stable releases since 2004 makes it a stand-out. The team is composed largely of individuals who choose to support specific tax solvers, thus explaining the specific state returns — in past years a few different forms were supported, but not continued in subsequent annual releases. Understandably, work on the code is cyclical, with discussion picking up each year as tax time in the US draws near.

[OpenTaxSolver GUI]

OTS is written in C, and at its heart is a text-driven utility that reads data for input from an external file, "solves" the tax calculation, and writes its output to a separate file. Experienced users may still prefer this approach, but the project's site says most choose to use the bundled GUI instead. The GUI version reads in data from an example or template file, but allows the user to input the correct numbers, then performs the back-end calculations. Using OTS will not fill out your return for you, it will just perform the calculations you need to fill it out correctly yourself.

The latest release is version 7.05, updated March 9, 2010. It includes support for 2009 US Form 1040 (individual federal tax return), plus Schedule A (itemized deductions), Schedule B (Interest and Ordinary Dividends), Schedule C (Profit or Loss From Business), and Schedule D (Capital Gains and Losses), and state income tax returns for 8 of the 41 US states with a state income tax: California, Massachusetts, North Carolina, New Jersey, New York, Ohio, Pennsylvania, and Virginia. Packages are provided for Linux, Windows, and (new for this year), Mac OS X; each of which contains the appropriate binaries as well as the GPLv2-licensed source code.

The Linux package is a 421KB tarball, containing the command line and GUI versions of the program, example data files, and a build script that can be used to rebuild the binaries. The GUI is implemented in Open Tool Kit (Otk), a tiny cross-platform widget library that is entirely self-contained. There is no installation process required; one needs only to unpack the tarball to an appropriate directory and run the binaries.

Command-line usage

There is a separate binary for each state return, a binary for Schedule C, and a single binary that handles US 1040 and Schedules A, B, and D. To generate a return from the command line, first open up a template or example file for the appropriate form from the examples_and_templates directory. The only difference between the two is that "examples" are completely filled-in with test data, while the "templates" contain all zeroes in the numeric entries and blanks in the text entries.

The site's instructions say to create a copy of the template for each individual return being prepared, a helpful tip for those who do taxes for friends and family members. The templates use the .dat extension, but are plain text, and line-oriented. Each field from the official IRS form which you are expected to fill in is represented by a labeled line in the file, and comments both expand on the purpose of the line and give valid input, such as:

    Dependents     ??       {Number of Dependents, self=1, spouse, etc.}
    [...]
    D4		;	{ Short-term gain from 6252, gain or loss from Forms 4684, 6781, 8824. }

The input file does not include every line in the final form, of course; the idea is that the user fills in the basic data, and the solver calculates all of the intermediate lines with the relevant formula. This is where the examples come in handy. While the template provides a line for every required field, the filled-out example input is more helpful because it gives clues as to how to enter data for specific situations. For example, more than one source of interest income is entered for L8a:

    L8a                     {Interest 1099-INT}
              37.71           {Bank Savings}
              12.65           {Credit Union}
              16.85           {Savings Bank}
                    ;

When the input file is complete, simply execute the appropriate binary from the shell prompt, passing the input file as an argument, such as: ./bin/taxsolve_US1040_2009 my_2009_1040.dat. The solver will generate an output file named my_2009_1040.out, containing the correct number for every line of the form, including the final amount owed or to be refunded. For the 1040 solver, numbers for the various Schedules are included in the output in tab-offset blocks at the point just before the line where they are referenced in the main form.

From there, filling out the final forms (whether on paper or PDF) is as simple as copying the data from the output file. There has been talk in past years of adding additional output techniques, including automatically filling-in the editable PDF forms provided by the IRS, or of transforming OTS's output into TurboTax's Tax Exchange Format (TXF) files, but thus far neither technique has made it into a release. A discussion thread on the project's SourceForge site mentions several methods that an entrepreneurial hacker can use to transform OTS text output into a format that can be imported to a PDF form directly.

OTS_GUI

The final binary in the package is the OTS GUI application. Unlike the command-line solvers, though, it must be launched with the provided shell script, Run_taxsolve_GUI_Unix.sh. At launch, it presents a menu of the available tax solvers, and a button with which to select an input file. The input file is loaded in, pre-filling the form fields in the GUI. If the input file is already correct, hitting the "Compute Tax" button generates the output file automatically.

But the advantage of the GUI, of course, is that browsing through the fields and editing the input numbers is easier than editing the text file before hand. The GUI breaks up the long list of fields into convenient, page-sized chunks, including the line numbers and editable comments.

Otk is far from being a "flashy" user interface toolkit; it is very limited in layout and text options, and incorporates a look-and-feel that might even elicit sneers from Motif and Tcl/Tk scripters. Aesthetics aside, though, in practical usage the bare-bones text rendering can be difficult to read — horizontal and vertical scaling seem to be calculated as a percentage of the window dimensions, causing some fields and comments to be overly compressed, and others stretched out. Still, with a little trial and error, it is easy enough to step through all of the pages and produce an accurate output file, and that is ultimately the only goal.

Speaking of Tcl/Tk, there is an alternate, Tcl/Tk-based GUI available for download in a separate package. The timestamp on the latest release is from February of 2010. However, it is source code only, and depends on several external Tcl libraries; building it is not for the faint-of-Tcl-heart.

Technology and taxes

OTS keeps it simple, which is probably the key to its survival over this many years: TaxGeek (the second-most active project) has not been updated since early 2008, the once-promising Tax Code Software Foundation site now redirects to a holding page. The results are not much better for countries other than the US; a few dormant projects exist for UK, German, and Australian returns, but nothing is active.

A combination of factors are proposed to explain the lack of open source tax preparation software whenever the discussion comes up, including the level of legal expertise required to keep up with every-changing tax code, and the fact that most geeks do not find the arithmetic of filling out the paperwork difficult enough to warrant writing an application to do it for them.

Furthermore, the "correctness guarantee" question comes up in any discussion, despite the fact that other tax preparation services and programs only offer guarantees subject to their own list of restrictions and limitations. The OTS site argues that the only way to know for sure that a tax preparation program's numbers are correct is to examine the formulas it uses — something impossible to do with proprietary code. Searching on the web for "mistakes" and "TurboTax" indeed turns up a massive number of hits, many coming from the professional web sites of human tax preparers. OTS at least makes its math accessible, and it does log its steps to stdout and mark them carefully in the output file to assist in double-checking.

To some, the answer is that the government should provide free software enabling its citizens to prepare and file their returns electronically. In the US, there is at least a partial solution, which may also detract from the willpower of the open source community to produce its own alternative. The IRS provides all of its forms, instructions, and ancillary publications for free in PDF format. It has also started allowing individuals and small businesses to file returns electronically, at no charge — through the use of approved, regulated third-party companies.

But this option creates another set of problems for some people with free software leanings. As the OTS site observes, the third-party electronic filing services require entrusting a stranger with highly sensitive personal information, but they also impose other arbitrary restrictions: the return must be prepared and filed all in one session, there are income-limit and business-size restrictions, and each individual must file his or her own return only. To the OTS team, those are reasons enough to take the (tax) law into their own hands.

Any tax preparer will tell you that nothing trumps personal experience when it comes to getting the most deductions and advantages when filing your return. OTS does not attempt to do the professional tax preparer's job; it merely attempts to speed up the process of composing a normal return for a user who already knows more or less what that return should include. Then again, especially if you are the resident tax preparer for your family or friends, a tool to crank out those returns rapidly and systematically is still a win. Time is money.


(Log in to post comments)

OpenTaxSolver solves taxes, openly

Posted Mar 18, 2010 2:12 UTC (Thu) by BrucePerens (guest, #2510) [Link]

I've theorized for years that tax software is one of the best examples of a good niche for proprietary software. It's not done for love, it's not (when best done) done by programmers at all.

OpenTaxSolver solves taxes, openly

Posted Mar 18, 2010 13:10 UTC (Thu) by michaeljt (subscriber, #39183) [Link]

>I've theorized for years that tax software is one of the best examples of a good niche for
>proprietary software. It's not done for love, it's not (when best done) done by programmers
>at all.
If tax authorities would supply some basic open source parts (likely mainly libraries) which
they updated as needed the rest would be easier.

OpenTaxSolver solves taxes, openly

Posted Mar 18, 2010 14:30 UTC (Thu) by nix (subscriber, #2304) [Link]

I suspect one reason why it's so often abandoned is that the annual tax-return ritual is mostly unique to the US. Other countries have some analogue of PAYE with *completely automatic* tax deduction, with things only changing when you're a sufficiently high earner that you can afford to hire someone to do the boring scutwork for you (or if you run a company).

In all my working life I have seen one tax form a year, which I never had to fill out anything on. Total number of tax forms required: nil. This is true of most employees in the UK and much of the rest of Europe as well. That's a large number of potential developers who simply have no reason to be interested in this stuff at all, even if the tax code wasn't intrinsically country-specific...

OpenTaxSolver solves taxes, openly

Posted Mar 18, 2010 14:39 UTC (Thu) by nye (guest, #51576) [Link]

Ah, right.

I was going to post asking what exactly this is for and who the target audience is, so thanks for implicitly answering that. I didn't realise US *individuals* needed to do this stuff - it sounds like more work than most small businesses need to do here.

OpenTaxSolver solves taxes, openly

Posted Mar 19, 2010 17:19 UTC (Fri) by dkrawchuk (subscriber, #21896) [Link]

In Canada also you are required by law to file a tax return if you earned any income in the previous year even if you are a minor. The upside is that the Canadian Revenue Agency has a very efficient online filing capability. The downside is that the mandatory file format can only be generated by CRA approved proprietary software.

Need for computers to file income taxes

Posted Mar 20, 2010 23:10 UTC (Sat) by giraffedata (subscriber, #1954) [Link]

In the US, only a few individuals have to file anything so complex that a computer would help. Most individuals have income only from wages and simple investments and any adjustments to that income that they may be entitled to fall below a threshold. Such a person could fill out the one-page form quicker than he could make the computer print it. He doesn't even have to do any arithmetic.

It's still embarassing for the country, though, because for such a person, the government already has all the information on the form and already has all the money, so really the government should send the form to the taxpayer instead of the other way around.

I think about 10% of the population has finances complex enough to require more sophisticated filing, and for them, computer assistance is extremely helpful. For example, someone who sells something for more than he paid for it (income tax is due on the profit) or runs a business or has high medical expenses (income tax is not due on income used for that).

Need for computers to file income taxes

Posted Mar 21, 2010 0:03 UTC (Sun) by jake (editor, #205) [Link]

> I think about 10% of the population has finances complex enough to
> require more sophisticated filing

Hmm, anyone that owns a house pretty much can't (or shouldn't) file the short form. That covers a *lot* people ...

jake

Need for computers to file income taxes

Posted Mar 21, 2010 1:47 UTC (Sun) by giraffedata (subscriber, #1954) [Link]

Hmm, anyone that owns a house pretty much can't (or shouldn't) file the short form. That covers a *lot* people ...

Yes, I was wrong. I found references that say only 60-70% of US taxpayers use the one page (1040EZ) and two page (1040A) short forms. I don't know if the 1040A is complicated enough for anyone to use a computer to generate it, but maybe.

I also looked up the house ownership impact. For those not familiar with the relevance of owning a house to income tax, it's actually about whether you borrowed money to buy your home. Income you spend on interest on such a loan is not taxable (and not for any sensible reason -- it's historical). I found out 70% of US homes are occupied by an owner and 60% of those homes are collateral on a loan, so that pretty much accounts for all the people who file the long form.

Need for computers to file income taxes

Posted Mar 23, 2010 7:09 UTC (Tue) by njs (guest, #40338) [Link]

> It's still embarassing for the country, though, because for such a person, the government already has all the information on the form and already has all the money, so really the government should send the form to the taxpayer instead of the other way around.

I'm pretty sure that they do do those computations, and if they don't match the ones on the form that the taxpayer sent in, they send a letter saying "you did it wrong, here's the correct answer, we'll just use that unless you argue".

In fact, a few years ago my filing got lost in the mail or something, and in the process of re-submitting I discovered I didn't have back-up copies of some of the documents like W-2's that *must* be included in the filing. It turns out that the solution to this problem is, you call up the IRS and they print out a copy, mail it to you, and then you mail it back.

OpenTaxSolver solves taxes, openly

Posted Mar 18, 2010 22:31 UTC (Thu) by kov (subscriber, #7423) [Link]

Brazil is a bit different. Your taxes are usually deducted automatically, but every year it is mandatory that you do an 'earnings declaration', in which you also declare spendings for things that the State should provide according to the Consitution (like education, or health), or things it allows you to get tax back for (some donations for instance).

The problem is the brazilian government is now going to disallow paper declarations - all declarations will *have* to be submitted through the Internet, and the only (official) way of doing so is using a software _they_ provide, that is not Free Software.

Thankfully, Alexandre Oliva has been championing a campaign to make the government aware of how stupid it is that they are not releasing the software as Free Software. Worth reading: http://www.fsfla.org/svnwiki/anuncio/2010-03-IRPF-Livre-2010.en

OpenTaxSolver solves taxes, openly

Posted Mar 19, 2010 13:07 UTC (Fri) by henning (subscriber, #13406) [Link]

Here in germany its also not mandatory if you're a 'normal' employee. But many people do it anyway, as its possible to get some money back from the state this way.

As the tax laws are complicated and change a lot, there exists several applications (about 10 - 40 €) that help with the appliance, including tips and give suggestions.

The government provides a proprietary freeware (windows, wine) solution, but this is more or less only an electronic version of the paper version, it obviously doesn't contain that much helpful informations.. So i use for this purpose a small dedicated virtualbox instance.

OpenTaxSolver solves taxes, openly

Posted Mar 19, 2010 13:32 UTC (Fri) by boudewijn (subscriber, #14185) [Link]

The dutch government provides a gratis 3-platform application (on Linux it
uses the motif version of wxwidgets, either as a tarball or autopackage, 32
bits only) that does all the calculations, has lots of help and can
automatically submit it. Even paid tax consultants do little more than enter
fields in the application -- it's really quite good and helpful.

OpenTaxSolver solves taxes, openly

Posted Mar 26, 2010 21:25 UTC (Fri) by i3839 (guest, #31386) [Link]

bin/ib2009ux uses GTK1.

Tax Calculator (Excel spreadsheet)

Posted Mar 18, 2010 5:09 UTC (Thu) by robla (subscriber, #424) [Link]

I tried OTS one year a few years back, and if I recall correctly, I had
problems figuring out how it arrived at the numbers it did. I'm sure I
could have eventually done it, but it wasn't making it any easier to do my
taxes, so I dropped it. However, that was a few years ago, and is just one
guy's experience.

I've gotta put in a plug for the Tax Collector spreadsheet:
http://home.mchsi.com/~taxcalculator/

I discovered it shortly after giving up on OTS. The guy doing it has been
at it every year since 1996. It's basically a tricked out Excel
spreadsheet with some macro voodoo going on. Seems to work well in
Gnumeric and presumably OpenOffice (though I haven't checked this year's
yet). It does some surprisingly sophisticated stuff under the hood; it's
pretty amazing how little one needs to enter to find a bunch of cells
already populated with the correct info.

It's not explicitly open source, but it's free donationware, and seems to
be more or less in the spirit of open source.

Tax Calculator (Excel spreadsheet)

Posted Mar 19, 2010 16:31 UTC (Fri) by cry_regarder (subscriber, #50545) [Link]

I used OTS for my taxes a few years ago---it worked great. Then I wrote a couple pairs of small java applets that used the data to form fill the .pdf tax forms...back then this wasn't part of OTS. I did contribute the scripts back. I stopped using it 'cause I got free tax prep from my employer after that.

OTS was great! You know what was great about it? You could understand and see every step it did. You could see the correlation between the data entered and the output all through the process.

Cry

Just use the web

Posted Apr 8, 2010 13:46 UTC (Thu) by mebourne (subscriber, #50785) [Link]

The answer to this is obvious. Do away with all of the paper forms and fat client software. The tax
return should be a web form that you can fill in online and submit directly to the tax office. They can
do the calculations on their servers and inform you of the tax calculation immediately, and any mistake
is their own responsibility.

Handily the UK has been doing just this for a few years now and it works very well, from any platform
of your choice. It's also great for last-minute people because the web filing is immediate at any time of
day.

Just use the web

Posted Apr 8, 2010 18:43 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

no going to happen in the US

1. it would directly compete with very large companies

2. it would put a lot of IRS people out of work

right now the IRS doesn't even take responsiblity for their own people giving you incorrect information (you can use it as a defense, but the best you will do is get the penalties for not having paied the right amount to begin with reduced)

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds