.TH tax "" "" "/rdb Command" .PC "Compute tax from income and tax table" \fBtax \fIincome \fB< \fItaxtable\fR .PP .II "table^compute tax" The command .B tax reads tax-table information from .I taxtable and computes taxes from it. .I income is the income you wish to check. .I taxtable must be in the three-column format shown in the following example. .PP .B tax writes to the standard output the computed tax rounded off to the nearest dollar. .SH Example The following table, .BR X83 , holds the federal income tax for single taxpayers for 1983 (Schedule X): .DM income tax percent ------ --- ------- 2300 0 11 3400 121 12 4400 251 15 6500 566 15 8500 866 17 10800 1257 19 12900 1656 21 15000 2097 24 18200 2865 28 23500 4349 32 28800 6045 36 34100 7953 40 41500 10913 45 55300 17123 50 .DE .PP If your taxable income is $20,000, type the following: .DM tax 20000 < X83 .DE .PP .B taxtable writes the following to the standard output: .DM 3369 .DE .PP That is, according to the data in .BR X83 , a single person with an income of $20,000 in 1983 owed the IRS $3,369. .PP You can also catch the output in a shell variable, like this: .DM TAX=`tax 20000 < X83` .DE .PP This initializes environmental variable .B TAX to .BR 3369 . You can now use .B TAX to write the tax into a table. For example: .DM compute "line == 35 { value = $TAX }" < form1040 .DE .PP Note that this command uses the quotation mark (") instead of the apostrophe ('), because we want the shell to substitute the value of tax where we have typed $TAX. To quote something within quotation marks ("), you must use apostrophes ('). .SH Notes Please note that the tax tables included with .B /rdb are for 1987. Mark Williams Company makes no claim as to their accuracy, or their usefulness in computing current taxes. .I "Caveat utilitor!"