I'm just trying to create output that is properly aligned like: GROSSPAY.......5400.00 NET PAY............4500.00 TAX......................900.00 Note: The periods are only there because yahoo cuts out multiple empty spaces. This is the code I have so far. It takes input from the user and calculates a paycheck for them. But the strings on the left need to be left-aligned and the integers on the right need to be right-aligned. This is what I have so far: import java.util.Scanner; //import input Scanner public class Assignment1_2 { //declare constants (deductions from paycheck) public static final double FED_TAX = 0.15; public static final double STATE_TAX = 0.05; public static final double SS_TAX = 0.05; public static final double MED_TAX = 0.03; public static final double PENSION = 0.08; public static final double HEALTH_INS = 125.00; public static void main(String[] args) { //declare variables needed for input from user int employeeId; String lastName; String firstName; double grossEarnings; double netPay; Scanner input = new Scanner(System.in); //create individual input boxes for each piece of input System.out.print("Employee ID: "); employeeId = input.nextInt(); System.out.print("First Name: "); firstName = input.next(); System.out.print("Last Name: "); lastName = input.next(); System.out.print("Gross Monthly Earnings: "); grossEarnings = input.nextDouble(); //print the output that has been generated from user input System.out.println("Employee ID: " + employeeId); System.out.println("Employee Name: " + firstName + " " + lastName); System.out.println("====================================="); System.out.printf("GROSS EARNINGS %30.2f\n", grossEarnings); System.out.printf("Federal Tax %30.2f\n",(grossEarnings * FED_TAX)); System.out.printf("State Tax %30.2f\n", (grossEarnings * STATE_TAX)); System.out.printf("Social Security %30.2f\n", (grossEarnings * SS_TAX)); System.out.printf("Medicare/Medicaid %30.2f\n", (grossEarnings * MED_TAX)); System.out.printf("Pension Plan %30.2f\n", (grossEarnings * PENSION)); System.out.printf("Health Insurance %30.2f\n", HEALTH_INS); System.out.println("====================================="); //formula for calculating pay after deductions netPay = grossEarnings - (grossEarnings * FED_TAX) - (grossEarnings * STATE_TAX) - (grossEarnings * SS_TAX) - (grossEarnings * MED_TAX) - (grossEarnings * PENSION) - HEALTH_INS; //print NET PAY System.out.printf("NET PAY %.2f\n", netPay); } } ------------------------------------------ The problem with this is that using printf, I have specified the width of the field (%30.2), so it does move the integers to the right, but since the GROSS PAY and NET PAY and everything varies in length, the dollar amounts on the right are no longer aligned. I have been fiddling around with this for a very long time and I can't seem to find the answer anywher. Does anyone know what the proper printf() format I need to do in order to achieve this?