Use Claude to Build a Timesheet and Calculate Employee Salary from an Excel File in 15 Minutes

Use Claude to Build a Timesheet and Calculate Employee Salary from an Excel File in 15 Minutes

📊 Use Claude to Build a Timesheet and Calculate Employee Salary from an Excel File in 15 Minutes

You have an Excel file logging every employee's clock-in and clock-out times for the month, and all that is left is adding up the hours, working out overtime, and turning that into a paycheck for each person. Doing this by hand usually eats a whole afternoon and it is easy to type a formula wrong. This post shows you how to hand that timesheet file to Claude so it calculates everything and hands back a complete payroll table you can download as an Excel file, in about 15 minutes.

🧰 What you need

  • A Claude account (claude.ai). Both the free and paid plans work. If you do not have one yet, sign up for free at claude.ai.
  • Turn on file creation and editing: go to Settings (the gear icon) > Capabilities and switch on "Create and edit files" (sometimes labeled "Code execution and file creation"). You only need to do this once.
  • Your Excel timesheet file, with one row per employee or per workday, including columns for date, clock-in time, and clock-out time (or total hours worked that day). Keep the file under 30MB.
  • Pay information for each person: hourly rate, daily rate, or a fixed monthly salary, plus your overtime rules (for example, anything past 8 hours a day counts at 1.5x, Sunday shifts count double) if your company applies them.

🪜 Step by step

Step 1: Upload the timesheet

Open a new chat on claude.ai, click the attachment (paperclip) icon and pick your Excel timesheet. Once it finishes uploading, type:

This is our [month/year] employee timesheet file.
Read the file and tell me what columns it has, how many employees there are,
and whether any row is missing data (missing clock-in or clock-out time).

This step helps you catch data-entry mistakes before calculating pay, like a day where the clock-out time was never logged.

Step 2: Tell Claude your pay rules

Every company calculates pay differently, so spell it out rather than letting Claude guess:

Our company's pay rules:
- Hourly rate: [amount] per hour (or: a fixed monthly salary of [amount]
  for a full [number] working days).
- Standard hours: [8] hours a day, Monday through [Saturday].
- Overtime: hours worked beyond the standard count at [1.5]x the normal hourly rate.
- Work on a day off ([Sunday] or a public holiday): counts at [2]x the normal hourly rate.
- Arriving more than [15] minutes late without notice: deduct [an amount, or no deduction].

For each employee, calculate: total standard working days, total overtime hours,
and total salary for the month, based on the rules above.

Replace the bracketed values with your company's actual numbers.

Step 3: Ask for a downloadable Excel payroll file

Once Claude has calculated everything and shown you the result table right in the chat, ask it to turn that into a file:

Now create an Excel payroll file with these columns: Name, Total working days,
Total overtime hours, Base pay, Overtime pay, Total salary.
Add a grand total row at the bottom. Format the money amounts with
thousands separators.

Claude runs a short script to build the file, which takes about thirty seconds to a minute, then shows a button to download the .xlsx file.

Step 4: Double-check before you use it

Open the downloaded file, pick 2 or 3 employees at random, and manually add up their hours and multiply by their rate to compare against what Claude calculated. If it matches, the file is ready to use. If it does not, go back to step 2 and describe your pay rules more precisely. Claude most likely misunderstood a condition, such as how overtime is counted.

✅ Sample result

For a timesheet covering 10 employees in a month, Claude returns a table like this in the chat before exporting the file:

NameTotal daysOvertime hoursBase payOvertime payTotal salary
Nguyen Van A26 days12 hours7,800,000540,0008,340,000
Tran Thi B24 days0 hours7,200,00007,200,000

The downloaded Excel file keeps these same columns, plus formatting and a company-wide grand total row at the bottom.

💡 Tips for better results

  • If your timesheet comes from a fingerprint time clock (a messy CSV export with extra columns), just upload the raw file and ask Claude to "clean this up before calculating." Claude reads both CSV and Excel files.
  • Keep each month in its own file instead of merging several months into one request, to avoid mixing up one month's hours with another's.
  • If your company has different pay rates by role, attach a small table listing "role, rate" right in step 2.
  • To reuse this every month, keep the same chat thread and next month just upload the new timesheet file, reminding Claude to "apply the same pay rules as last month."

⚠️ Limitations to know

  • Claude calculates exactly what you describe, but it does not automatically know your country's labor law, personal income tax, or social insurance requirements. You still need to work those out separately or have HR or accounting review them.
  • Always cross-check the numbers before paying real salaries. Do not transfer money based only on an AI-calculated file that nobody has reviewed.
  • Avoid uploading files containing employees' national ID numbers or bank account numbers unless they are truly necessary for the pay calculation, to reduce the risk of a data leak.
  • Very large files (hundreds of employees, several months merged together) can make Claude slower or more likely to miss a row. Split the work by department or by month instead.

❓ FAQ

Can Claude read old .xls files, or only .xlsx? Claude reads both formats, as well as CSV exports from time clocks, as long as the file is under 30MB.

Do I need a paid plan to use this? No. File creation and reading works on the free Claude plan too, you just need to turn it on under Settings > Capabilities. Paid plans simply give you a higher daily usage limit.

What if my company pays by shift (morning, afternoon, night shift)? That works too. Just describe each shift's start and end time and its rate in step 2, and Claude will calculate each shift type separately.

Is it safe to put employee salary data into Claude? Under Anthropic's policy, data you upload is used to carry out the conversation and is not used to train the model if you use a personal account and have not turned on model-training data sharing in Settings. Even so, avoid including identifying information you do not need, as noted in the limitations above.

How do I know Claude calculated overtime according to the law, not just according to my formula? Claude only calculates according to the rules you describe, it does not check whether those rules match current labor law on its own. Confirm your overtime and holiday-pay rules with HR or the relevant regulations before entering them in step 2.

If you are new to Claude, read What is Claude AI: a guide for beginners to learn how to set up your account and its basic features. If your work also involves sales data, see Use Claude to analyze a sales Excel file and find your best sellers. If you just need one quick formula in Excel or Google Sheets rather than a whole file built by AI, see Use AI to write Google Sheets/Excel formulas without memorizing functions. And if you often receive paper or photo invoices that need entering into a spreadsheet, see Use ChatGPT or Gemini to read invoice photos straight into a spreadsheet.

#AI #Claude #Payroll #Timesheet #HR #Excel

More articles