Airtable

How to set up a formula to calculate working days in Airtable?

Discover the secrets to creating a powerful formula in Airtable that effortlessly calculates working days, boosting both your project management and productivity.

Developer profile skeleton
a developer thinking

Overview

Want to find out how to count working days in Airtable? It's all about creating a formula that skips weekends and holidays, so you get the exact business days. Knowing how to use Airtable's functions like WORKDAY, DATETIME_DIFF, and IF is super important for this. When you mix these functions together, they help you leave out the non-working days from your dates. This guide shows you step-by-step how to make a custom formula that fits your specific needs and keeps track of working days accurately in your Airtable setup.

Get a Free No-Code Consultation
Meet with Will, CEO at Bootstrapped to get a Free No-Code Consultation
Book a Call
Will Hawkins
CEO at Bootstrapped

How to set up a formula to calculate working days in Airtable?

Step 1: Open Your Airtable Base

First things first, open up the Airtable base where you want to figure out the working days. Make sure you've got a table with a start date and an end date.

Step 2: Add Necessary Fields

If you don't already have them, add these two fields:

  • Start Date: This should be a Date field marking the beginning of the period.
  • End Date: Another Date field, but this one marks the end of the period.

Step 3: Create a New Field for Working Days

Now, add a new field to your table and call it something like Working Days. Set the field type to “Formula”.

Step 4: Enter a Formula for Calculating Total Days

In the formula field, you’ll want to calculate the total number of days between the Start Date and End Date. Use this formula:

DATETIME_DIFF({End Date}, {Start Date}, 'days')

This will give you the total number of days, but heads up—it includes weekends.

Step 5: Adjust for Weekends

To exclude weekends, tweak the formula in the Working Days field. Use this adjusted formula:

IF(
    AND({Start Date}, {End Date}),
    IF(
        WEEKDAY({Start Date}) <= WEEKDAY({End Date}),
        INT((DATETIME_DIFF({End Date}, {Start Date}, 'days') / 7) * 5 + (MIN(WEEKDAY({End Date}) + 1, 6) - MAX(WEEKDAY({Start Date}), 1))),
        INT((DATETIME_DIFF({End Date}, {Start Date}, 'days') / 7) * 5 + (6 - WEEKDAY({Start Date})) + MIN(WEEKDAY({End Date}) + 1, 5))
    ),
    BLANK()
)

This formula takes into account the days of the week for both start and end dates, calculates the number of full weeks, and then adjusts for any partial weeks at the beginning or end of the period.

Step 6: Save the Formula

Save the formula to apply it to the new Working Days field. Airtable will now calculate the working days between the Start Date and End Date for each record, skipping weekends.

Step 7: Verify the Results

Double-check the results for a few records to make sure the formula is correctly calculating the working days. Adjust the formula if needed.

And there you have it! This setup will dynamically calculate the working days while excluding weekends in Airtable.

Explore more Airtable tutorials

Complete Guide to Airtable: Tutorials, Tips, and Best Practices

Explore our Airtable tutorials directory - an essential resource for learning how to create, deploy and manage robust server-side applications with ease and efficiency.

Why are companies choosing Bootstrapped?

40-60%

Faster with no-code

Nocode tools allow us to develop and deploy your new application 40-60% faster than regular app development methods.

90 days

From idea to MVP

Save time, money, and energy with an optimized hiring process. Access a pool of experts who are sourced, vetted, and matched to meet your precise requirements.

1 283 apps

built by our developers

With the Bootstrapped platform, managing projects and developers has never been easier.

hero graphic

Our capabilities

Bootstrapped offers a comprehensive suite of capabilities tailored for startups. Our expertise spans web and mobile app development, utilizing the latest technologies to ensure high performance and scalability. The team excels in creating intuitive user interfaces and seamless user experiences. We employ agile methodologies for flexible and efficient project management, ensuring timely delivery and adaptability to changing requirements. Additionally, Bootstrapped provides continuous support and maintenance, helping startups grow and evolve their digital products. Our services are designed to be affordable and high-quality, making them an ideal partner for new ventures.

Engineered for you

1

Fast Development: Bootstrapped specializes in helping startup founders build web and mobile apps quickly, ensuring a fast go-to-market strategy.

2

Tailored Solutions: The company offers customized app development, adapting to specific business needs and goals, which ensures your app stands out in the competitive market.

3

Expert Team: With a team of experienced developers and designers, Bootstrapped ensures high-quality, reliable, and scalable app solutions.

4

Affordable Pricing: Ideal for startups, Bootstrapped offers cost-effective development services without compromising on quality.

5

Supportive Partnership: Beyond development, Bootstrapped provides ongoing support and consultation, fostering long-term success for your startup.

6

Agile Methodology: Utilizing agile development practices, Bootstrapped ensures flexibility, iterative progress, and swift adaptation to changes, enhancing project success.

Yes, if you can dream it, we can build it.